From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33849) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tqkfl-0004Pp-6C for qemu-devel@nongnu.org; Thu, 03 Jan 2013 08:17:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tqkfj-0004bt-W3 for qemu-devel@nongnu.org; Thu, 03 Jan 2013 08:17:25 -0500 Received: from cantor2.suse.de ([195.135.220.15]:57921 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tqkfj-0004bl-QG for qemu-devel@nongnu.org; Thu, 03 Jan 2013 08:17:23 -0500 From: Alexander Graf Date: Thu, 3 Jan 2013 14:17:18 +0100 Message-Id: <1357219038-841-1-git-send-email-agraf@suse.de> Subject: [Qemu-devel] [PATCH] linux-user: fix mips 32-on-64 prealloc case List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 -- 1.7.12.4