From patchwork Sat Jul 8 02:50:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 9831321 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EC48E602A0 for ; Sat, 8 Jul 2017 02:54:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C7A7F282EC for ; Sat, 8 Jul 2017 02:54:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A4F4728504; Sat, 8 Jul 2017 02:54:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 22622282EC for ; Sat, 8 Jul 2017 02:54:08 +0000 (UTC) Received: from localhost ([::1]:59567 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTfsm-0003Ji-5j for patchwork-qemu-devel@patchwork.kernel.org; Fri, 07 Jul 2017 22:54:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43702) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTfpo-0001aZ-Ld for qemu-devel@nongnu.org; Fri, 07 Jul 2017 22:51:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dTfpm-00053A-KN for qemu-devel@nongnu.org; Fri, 07 Jul 2017 22:51:04 -0400 Received: from mail-qt0-x243.google.com ([2607:f8b0:400d:c0d::243]:34402) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dTfpm-000531-Fq; Fri, 07 Jul 2017 22:51:02 -0400 Received: by mail-qt0-x243.google.com with SMTP id m54so6452869qtb.1; Fri, 07 Jul 2017 19:51:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=x0B4mLaLsw+VQCgKtBesMCfDp7aZy9g1E3kvsYp90rQ=; b=VY2W6oFufWceuAYVeuns0aUvdvku568ir8jnmctnVPp7VIIc5XiLr/KZCg5jy7iheJ ctyR68TbBD3DOyBUSk+l7Sh2OIaDZnwd1zMz2qDcr5FlbkbfpVZxm+35GYuAd1LV7Edv h/GKghjPmMATAM0QI0jEKjHWCcD9iytNfLL6IVAJI5FPA+Qfy2uWkX+fS3bYtBqnp0J2 jqk3qUYI6X6So7mOloiuvomrwZl72Raz424ZmhdmaT6N8DtJRQ3Osbg66GPynt5Zw8Na 8FfgRnc60PeiFAy2GjUNF6f09AU51/xBqXJjTeXZv4/tEIDvdWAYbgzrDfoHfJD34UHp 65gA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=x0B4mLaLsw+VQCgKtBesMCfDp7aZy9g1E3kvsYp90rQ=; b=nucCpGcnk07aTECFuOmes2LOHteqPlXt2AvZfu2lXQdRujDcoZHYTeF+fUiPuyYzx7 XRNiNYLw+4N3GVmy4uM6bSG1CONQDLRTmEUOvcDjgPxbsemug7oQqI10xJZI/z/UGLjc PB19pnUAnAmVK36aApW21l+yoA+Qy8QRercuCsohRV6mLOq7GSefDx7xYHRz5o0N/XOi 4c/Ynd/SBqGUgX9aTlDIQK2m47F5ep0YmnNB0NZks6pcxk9diJTMzenZqOXZYdW9fPWa kBWSHJ2c18h+8o6fMhGXOw8SR3oCZa+jFfq3HtxpDw+fsLN8V+NE7+vrot6Jjmi4yL8a VlYg== X-Gm-Message-State: AKS2vOzpVbd5T1TAcNAWKt8AciFXZEKpEAM1Nw2vE6Ta4KGDnxAW4XCp ENJ2xCxDAkseEEQkJWA= X-Received: by 10.200.50.249 with SMTP id a54mr69633899qtb.91.1499482261748; Fri, 07 Jul 2017 19:51:01 -0700 (PDT) Received: from bigtime.twiddle.net.com (rrcs-66-91-136-156.west.biz.rr.com. [66.91.136.156]) by smtp.gmail.com with ESMTPSA id q90sm3793925qki.11.2017.07.07.19.50.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Jul 2017 19:51:01 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 7 Jul 2017 16:50:30 -1000 Message-Id: <20170708025030.15845-4-rth@twiddle.net> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170708025030.15845-1-rth@twiddle.net> References: <20170708025030.15845-1-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::243 Subject: [Qemu-devel] [PATCH 3/3] linux-user/sh4: Reduce TARGET_VIRT_ADDR_SPACE_BITS to 31 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aurelien@aurel32.net, riku.voipio@iki.fi, laurent@vivier.eu, qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The real kernel has TASK_SIZE as 0x7c000000, due to quirks with a couple of SH parts. But nominally user-space is limited to 2GB. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- target/sh4/cpu.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/target/sh4/cpu.h b/target/sh4/cpu.h index e3abb6a..3121d1e 100644 --- a/target/sh4/cpu.h +++ b/target/sh4/cpu.h @@ -45,7 +45,11 @@ #define TARGET_PAGE_BITS 12 /* 4k XXXXX */ #define TARGET_PHYS_ADDR_SPACE_BITS 32 -#define TARGET_VIRT_ADDR_SPACE_BITS 32 +#ifdef CONFIG_USER_ONLY +# define TARGET_VIRT_ADDR_SPACE_BITS 31 +#else +# define TARGET_VIRT_ADDR_SPACE_BITS 32 +#endif #define SR_MD 30 #define SR_RB 29