From: Zhang Xiantao <[EMAIL PROTECTED]>
Date: Mon, 24 Dec 2007 14:06:31 +0800
Subject: [PATCH] kvm: qemu/ia64: guest with > 3G memory fix.

This patch fix boot issue with >3G memory. Currently, set
TARGET_PHYS_ADDR_SPACE_BITS to 36 bits, and safely support
<64G memory for guests.
Signed-off-by: Zhang Xiantao <[EMAIL PROTECTED]>
---
 qemu/exec.c   |    2 ++
 qemu/hw/ipf.c |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/qemu/exec.c b/qemu/exec.c
index 69adc5e..de73fde 100644
--- a/qemu/exec.c
+++ b/qemu/exec.c
@@ -81,6 +81,8 @@
 #define TARGET_PHYS_ADDR_SPACE_BITS 32
 #elif TARGET_X86_64
 #define TARGET_PHYS_ADDR_SPACE_BITS 42
+#elif defined(TARGET_IA64)
+#define TARGET_PHYS_ADDR_SPACE_BITS 36
 #else
 #define TARGET_PHYS_ADDR_SPACE_BITS 32
 #endif
diff --git a/qemu/hw/ipf.c b/qemu/hw/ipf.c
index 9c74531..88a897d 100644
--- a/qemu/hw/ipf.c
+++ b/qemu/hw/ipf.c
@@ -443,7 +443,7 @@ static void ipf_init1(ram_addr_t ram_size, int
vga_ram_size,
                free(image);
                flush_icache_range((unsigned long)fw_image_start,
                        (unsigned long)fw_image_start + image_size);
-               kvm_ia64_build_hob(ram_size, smp_cpus, fw_start);
+               kvm_ia64_build_hob(ram_size + above_4g_mem_size,
smp_cpus, fw_start);
        }
 #endif
 
-- 
1.5.2

Attachment: 0002-kvm-qemu-ia64-guest-with-3G-memory-fix.patch
Description: 0002-kvm-qemu-ia64-guest-with-3G-memory-fix.patch

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to