aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2013-01-03 14:17:18 +0100
committerAurelien Jarno <aurelien@aurel32.net>2013-01-08 11:48:39 +0100
commit314992b1a48a5a2a0f2b14195f959ad2c3f5b3ff (patch)
treec91d074f9c26bb4fa5e95477229edf430c8aa9ef /linux-user
parent8e4a424b305e29dc0e454f52df3b35577f342975 (diff)
downloadqemu-314992b1a48a5a2a0f2b14195f959ad2c3f5b3ff.zip
qemu-314992b1a48a5a2a0f2b14195f959ad2c3f5b3ff.tar.gz
qemu-314992b1a48a5a2a0f2b14195f959ad2c3f5b3ff.tar.bz2
linux-user: fix mips 32-on-64 prealloc case
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 <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index f6c4c8d..9ade1bf 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