From patchwork Thu Oct 5 14:36:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 114945 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp665893qgn; Thu, 5 Oct 2017 07:38:15 -0700 (PDT) X-Received: by 10.55.42.73 with SMTP id q70mr29739718qkh.337.1507214295421; Thu, 05 Oct 2017 07:38:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507214295; cv=none; d=google.com; s=arc-20160816; b=ZVkXEoTT31dvYN8BF6Z/QKvFRvEwXNqy5LDdE/3TQ7fziduSvwDnYBIO4RY8CfmAJD v5FeTQlpLG4dWecx0BVlkhAxqPBsWtIM11v2bm4VaM/8tE9Irz+awDLhJpiLf3SsjiRN MzObPaxAOqej4IgJ9hcnvBtSLpmk53hecj8NdKhcQMc5NHXggNNHqqByfdrTFddvY7Ay uDWCd9OhDsDPCG2n92wjrhevWnUnbEaAwtx/OZxRWysqzmRQA79lAutcf5XCD25L0w5r qws4fsuohhSP9FKpXIQYOhpsnoSbgGwwqOdO7+gpab/MIVZln7qv2LWnIY/wwN2ttqlC jVgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=cXxdyWFqydMB2qOTu/4wULu4y8k6Bslrjk6HWtmobII=; b=yTKMVwRks8pVguiKYeQEUw24MjDAkr12wvh0lpeo1HMqlTxdK4HzdOPQtmNUhFrJ1/ itxY+WbmJhe+SzqPf2+B0+C7CUXM0CuZzSZEykxJfIWCN+P7wTk4U8vGJXT8ok9a97ri kuQjDSMeMKMLmYKY8uz2ZRxuHF2EjDzIrwA5hXqsfWTl2VAwlyT34OZ+n5h57kcjgOnn elZmTi8ovykH9ZjAe+5G//aq93aXcdvxSYIJ8DCNXHK2dKDa0XjVy3GnAN/bCM1C6KBs vYw+N3PgqVnccVLSFfVlSigG1j8WM3u451paJejUzhQLWB/667x/69izTRt2tXPM9Pna vOqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=PpACFAvA; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id q1si8894715qta.21.2017.10.05.07.38.15 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 05 Oct 2017 07:38:15 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=PpACFAvA; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:40187 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e07Hy-0003bg-UG for patch@linaro.org; Thu, 05 Oct 2017 10:38:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40785) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e07G4-0002KA-JG for qemu-devel@nongnu.org; Thu, 05 Oct 2017 10:36:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e07G0-0001yp-Js for qemu-devel@nongnu.org; Thu, 05 Oct 2017 10:36:16 -0400 Received: from mail-qt0-x22f.google.com ([2607:f8b0:400d:c0d::22f]:55452) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e07G0-0001yQ-F1 for qemu-devel@nongnu.org; Thu, 05 Oct 2017 10:36:12 -0400 Received: by mail-qt0-x22f.google.com with SMTP id x54so25684375qth.12 for ; Thu, 05 Oct 2017 07:36:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cXxdyWFqydMB2qOTu/4wULu4y8k6Bslrjk6HWtmobII=; b=PpACFAvARajS1egSQP5tkIP5skQTLqBPlOLiFsdyr/dfTgAmEVR1EbcMLLbdGHWG8U QNrvYmJ969lX/z8/B6ZWAFwAxN8hOoQVeKPCKWXCl/VZ1U2Ysr4XuPAt4ZmxFUaCa+qC 64FG3yF/Xh255j9zMvUuUEwRlZWUR4tZlb8So= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cXxdyWFqydMB2qOTu/4wULu4y8k6Bslrjk6HWtmobII=; b=ivtK+hWI30pxqoCtPq/0YZM9EooGHlvsj0gRJSuqosWbR3KL6R+eC3elLm4Em2bhvW T8IjEIQagh8hkeUL29GhOAOhUdAkbfJOrHOSa55PoB5Y9+TPoZ5edxtvaPf50nkc4ujM wEy+SSN67q6Xpio7wVDpdI5JFf0ugOpbNS34ke4Hob54Oeeie67jefVjtsmRojpESE6D LcbtCbnLsuXeJADf0Q5uC+t5675MRIkNS+CB2zHP1+cG+Oz42hdJ1yxerLN4uv6wkF6O n7LKENXTmqplB6JusKVxkKLn2BP4OGeyMGXa5bZxpbAi62uz6qlByuqQG7YjQR6e+b32 3Bbw== X-Gm-Message-State: AMCzsaVX1ytnEExxZhtNtSuU2B/YXeJN9deDiWbizYC3CxsleJYMklQn 3NnTxhSx60ULyYH09Dwe0rfR744b13E= X-Google-Smtp-Source: AOwi7QC7xmPtbNiViNg3i3r22a69Dm7jSU0L3KWncsPfoqFczTPnvZq6Ig9+2vl/Rhvqt1tCp9hLsQ== X-Received: by 10.129.120.79 with SMTP id t76mr9347734ywc.126.1507214171647; Thu, 05 Oct 2017 07:36:11 -0700 (PDT) Received: from bigtime.twiddle.net.com ([2606:a000:7a4a:b100::1b]) by smtp.gmail.com with ESMTPSA id c13sm8277148ywm.101.2017.10.05.07.36.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Oct 2017 07:36:10 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 5 Oct 2017 10:36:01 -0400 Message-Id: <20171005143601.21584-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171005143601.21584-1-richard.henderson@linaro.org> References: <20171005143601.21584-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::22f Subject: [Qemu-devel] [PATCH v2 4/4] 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: peter.maydell@linaro.org, riku.voipio@iki.fi, Richard Henderson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson 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é Message-Id: <20170708025030.15845-4-rth@twiddle.net> --- target/sh4/cpu.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -- 2.13.6 diff --git a/target/sh4/cpu.h b/target/sh4/cpu.h index 79f85d3365..123f34783a 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