From patchwork Sun Feb 10 18:30:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 219511 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6EC992C0095 for ; Mon, 11 Feb 2013 05:32:49 +1100 (EST) Received: from localhost ([::1]:42062 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U4bhn-0007c9-CR for incoming@patchwork.ozlabs.org; Sun, 10 Feb 2013 13:32:47 -0500 Received: from eggs.gnu.org ([208.118.235.92]:58839) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U4bgQ-0005K0-Ra for qemu-devel@nongnu.org; Sun, 10 Feb 2013 13:31:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U4bgJ-0000bV-J6 for qemu-devel@nongnu.org; Sun, 10 Feb 2013 13:31:22 -0500 Received: from mail-pb0-f41.google.com ([209.85.160.41]:57266) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U4bgJ-0000ay-CE for qemu-devel@nongnu.org; Sun, 10 Feb 2013 13:31:15 -0500 Received: by mail-pb0-f41.google.com with SMTP id um15so403248pbc.28 for ; Sun, 10 Feb 2013 10:31:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=/Akkp2YP0TviBlVtcjBu2czQlntXEIkzF0vwGsUCKkE=; b=GXpuVr3CEMUHWZpppaWxM30KUKVM1V2SeHXvrME1gYZhvyZjEo12xoY2MPgYKCu/cG 0E63h4lHurDG1hDa7VylGM0+icvjix/J6tvw//JW51Xw8L73OYapV4QUb8H2d3gOqDr+ LWq7ebx8jOjGr+2Wbm4B+MFkEa5umvID2WedXxzFbgHlhwGZrb5ENpEiKfqhuyL0M4lr kajyPXsADneCOhQUmXPCWdY7od+2FamtpyvvLgBt74QUnF+O+GmZomoMMyW4oZjmH2ck LBqShA5ArwYSp+PYG5g0k2473gcmlf1VtOEhgTY4aNFSGIDMjsAWuAy0Y9eeXvIPoywS YbCQ== X-Received: by 10.68.236.227 with SMTP id ux3mr12825789pbc.143.1360521074673; Sun, 10 Feb 2013 10:31:14 -0800 (PST) Received: from pebble.twiddle.net (50-194-63-110-static.hfc.comcastbusiness.net. [50.194.63.110]) by mx.google.com with ESMTPS id rk5sm5105766pbb.21.2013.02.10.10.31.12 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 10 Feb 2013 10:31:13 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sun, 10 Feb 2013 10:30:49 -0800 Message-Id: <1360521050-29680-10-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1360521050-29680-1-git-send-email-rth@twiddle.net> References: <1360521050-29680-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.160.41 Cc: peter.maydell@linaro.org, riku.voipio@iki.fi, aurelien@aurel32.net Subject: [Qemu-devel] [PATCH 09/10] mipsn32-linux-user: Restrict address space to 31-bits. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- linux-user/main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/linux-user/main.c b/linux-user/main.c index 8c4dffd..25491ca 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -46,10 +46,10 @@ int gdbstub_port; envlist_t *envlist; const char *cpu_model; unsigned long mmap_min_addr; + #if defined(CONFIG_USE_GUEST_BASE) unsigned long guest_base; int have_guest_base; -#if (TARGET_LONG_BITS == 32) && (HOST_LONG_BITS == 64) /* * When running 32-on-64 we should make sure we can fit all of the possible * guest address space into a contiguous chunk of virtual host memory. @@ -57,16 +57,16 @@ 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 +# if HOST_LONG_BITS == 64 \ + && (defined(TARGET_ABI_MIPSO32) || defined(TARGET_ABI_MIPSN32)) /* MIPS only supports 31 bits of virtual address space for user space */ -unsigned long reserved_va = 0x77000000; -# else +unsigned long reserved_va = 0x7f000000; +# elif (TARGET_LONG_BITS == 32) && (HOST_LONG_BITS == 64) unsigned long reserved_va = 0xf7000000; -# endif #else unsigned long reserved_va; #endif -#endif +#endif /* CONFIG_USE_GUEST_BASE */ static void usage(void);