]> xenbits.xensource.com Git - qemu-xen-3.3-testing.git/commitdiff
[ia64] Fix memory size calculation on VT-i over 3GB memory
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 9 Oct 2008 13:46:16 +0000 (14:46 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 26 Nov 2008 15:08:07 +0000 (15:08 +0000)
VT-i domains have two memory holes: VGA I/O (under 1MB) and MMIO
(3GB-4GB). This patch calculates the correct memory size with them.

This is based on xen-unstable 10936:a0b3cf802d99.

Original patch by Zhang xiantao <xiantao.zhang@intel.com>
Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
(cherry picked from commit 6bb40e81b938beb53eb4102cdfae03dd79edbf13)

vl.c

diff --git a/vl.c b/vl.c
index e50a02d49c300d875700be9a4f1e9d2202d8d618..2f567410aae94fa7a4f158e432ebfdc891ac0745 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -8669,6 +8669,14 @@ int main(int argc, char **argv)
     }
 
 #endif
+
+#if defined (__ia64__)
+    if (ram_size > VGA_IO_START)
+        ram_size += VGA_IO_SIZE; /* skip VGA I/O hole */
+    if (ram_size > MMIO_START)
+        ram_size += 1 * MEM_G; /* skip 3G-4G MMIO, LEGACY_IO_SPACE etc. */
+#endif
+
     /* init the memory */
     phys_ram_size = machine->ram_require & ~RAMSIZE_FIXED;