From patchwork Thu Jan 3 13:17:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: linux-user: fix mips 32-on-64 prealloc case Date: Thu, 03 Jan 2013 03:17:18 -0000 From: Alexander Graf X-Patchwork-Id: 209249 Message-Id: <1357219038-841-1-git-send-email-agraf@suse.de> To: qemu-devel qemu-devel Cc: Riku Voipio , Michael Tokarev , Aurelien Jarno MIPS only supports 31 bits of virtual address space for user space, so let's make sure we stay within that limit with our preallocated memory block. This fixes the MIPS user space targets when executed without command line option. Signed-off-by: Alexander Graf --- linux-user/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/linux-user/main.c b/linux-user/main.c index c4d10ac..a2bc09d 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -57,7 +57,12 @@ int have_guest_base; * This way we will never overlap with our own libraries or binaries or stack * or anything else that QEMU maps. */ +# ifdef TARGET_MIPS +/* MIPS only supports 31 bits of virtual address space for user space */ +unsigned long reserved_va = 0x77000000; +# else unsigned long reserved_va = 0xf7000000; +# endif #else unsigned long reserved_va; #endif