From patchwork Fri Sep 1 02:23:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 719481 Delivered-To: patch@linaro.org Received: by 2002:ab3:1981:0:b0:23f:8cfb:5ad7 with SMTP id 1csp17184lti; Thu, 31 Aug 2023 19:25:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH8SZ3Ss+6dY1P7EXQpFBmZhcUZLS8p9T92PXa1TtQmc+qnNglTuuxzWjWDZmXBdUzTFvQ8 X-Received: by 2002:a0c:b31d:0:b0:647:16e7:c5c8 with SMTP id s29-20020a0cb31d000000b0064716e7c5c8mr1171899qve.11.1693535151177; Thu, 31 Aug 2023 19:25:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693535151; cv=none; d=google.com; s=arc-20160816; b=jdu41at+pcAamzQfI0xHKpPwshW4aTkI/AyBMtSTRuK+T2KMxcFEoGoRsrmTsJFKTI 6elDragB+Qp3UdB+4Wce+LWok/CJwrVoBbQt5v0rHw3LKe42/ZhceByAdPZOZ+KzgV9O +SmH1xncK0zpLmPbWHyhsGgBMRDr7GoSRmjlk6h9sJsOGh30fvQi5NNMFsBUlaQ0bMyL 1eXjicRU5yJB5x3xLJramZPd2cZVC5M3e46Wt0fN28f7FiR/LB4Bpxc4ojBNudDu9yMn idJZKPepW8Xb6cIew9k2F9MUMtKsizbEI5bXOuAJ7M/xxcC8PyZ/ikQZo8Nrm+M8j7/A 7Vrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=UM3G3JW9WxcLT5Dzb3w4vT9giwKkE+uVqc4Wz3d/fxQ=; fh=r1cPj2GlTGSV4V8jQu3jfCKsZwpJ5ktYEUy+P7GD/+s=; b=x6c6yEVMYmcElZc5oT1wtoSiCFwkStJR8D3xNNvZuYzJRyYITODRWw80S+D34cTBU2 MPGCmOKLRLwf2PZr79kql/zV1W0pkVNSWvl2RMq3hmnweot9b6LYTtQBbBjsgTEEu+We VPjwDIuqaz/iJkP4A9vgPVOhS4aTa1mFC/0zKl9TdZPBrqmsa/H5+g4sHq9FEf89C3nq kEQTVAQjhTxmEWr2LAJlXrh21hliv1gKLLaaOyd3tAi2a8Rj7vG7mjMPPcyLj5zx1xJ0 Z6t/S6zwBVViudwVP1xGnUVIfQ/Rc+4u/Ym9wCk8eZY+gSyuVHElEdlXyAR96sDMHVFO LXfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FzDh7kdF; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id h1-20020a0cf401000000b0064c6b7d96e1si1682279qvl.372.2023.08.31.19.25.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Aug 2023 19:25:51 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FzDh7kdF; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qbtph-000808-Dw; Thu, 31 Aug 2023 22:24:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qbtpZ-0007B5-Mv for qemu-devel@nongnu.org; Thu, 31 Aug 2023 22:24:17 -0400 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qbtpJ-0001TK-Vk for qemu-devel@nongnu.org; Thu, 31 Aug 2023 22:24:13 -0400 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-68a56401b9aso1248220b3a.1 for ; Thu, 31 Aug 2023 19:24:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693535039; x=1694139839; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UM3G3JW9WxcLT5Dzb3w4vT9giwKkE+uVqc4Wz3d/fxQ=; b=FzDh7kdFcl+ICqiOH8saF6XwJwMc1DcChe0vxWHjxEx8s0Xu1OaH+DnNrWMw0je2zD K8ho8r9LXLBPDrP4yW9aj9Hnrs4+qKz1CDeSlqrwPGqfROKC0CQVc1tbgCylJ0hBZS0Z rNazWYATamlcc1Cfo/A29qR7s+mCtqWmQM6/JRBh1xcCSt3QVvgl96knfAHtVQM+FBGb 7cNFbE3oMSgrAZ2E8ZX4mDJkeU0PyS5MjKsoJtRQsGPt4XherlwDfUumqFgyfHVCR1Lu OuNURzgqUJOM1ripkxTug2KwiVZL2dQJHB/TFsY3WuHj2C8Zyt4ZmKnRGja6XOK+BQiE RPhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693535039; x=1694139839; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UM3G3JW9WxcLT5Dzb3w4vT9giwKkE+uVqc4Wz3d/fxQ=; b=NXUurHzwqoZ4r3SYpem0jjV0MWNyGiZToKEnUk1mwRcCfcfvBpE81nYfRFkEktmEVq 3zNEZ3OS0yug+4mFP9A+tGHmgKAbGq5s0QotYm2o8dQPiVEE4AB97QaOsqNkdw0QXUIT UWDG3UcTVXSsQnynOmWLpXdcNPzPvb4d5TLJHFTYhlP9sMZSY4swoiXk1hD1xUIeKkQy LDwkRMnXepy+KKCzBMcsoNnRztns08tw2GiCNfjvKC9JRky9CfRM0mbkFRD+2McZL/nI c7GxdoHGVXQUluKLJMbDnh2C6KdStkxYQvNes1djINnzTqrxb93CFtvws33FHfKNznSm 7xEA== X-Gm-Message-State: AOJu0YxnsRfccGFdfoMfL3Aex2OP995+VBHCqU+7BUbAA3o7ZM0L1Cva iLrnmdM29CzktBtX2tMjZvFIuAX6PUcvN1qtA3A= X-Received: by 2002:a05:6a20:157:b0:12f:c61e:7cac with SMTP id 23-20020a056a20015700b0012fc61e7cacmr1470526pzs.31.1693535039263; Thu, 31 Aug 2023 19:23:59 -0700 (PDT) Received: from stoup.. ([71.212.131.115]) by smtp.gmail.com with ESMTPSA id c25-20020aa781d9000000b0068a54866ca8sm1906977pfn.134.2023.08.31.19.23.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Aug 2023 19:23:58 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: laurent@vivier.eu, alex.bennee@linaro.org Subject: [PATCH v2 33/33] target/alpha: Enable TARGET_PAGE_BITS_VARY for user-only Date: Thu, 31 Aug 2023 19:23:31 -0700 Message-Id: <20230901022331.115247-34-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230901022331.115247-1-richard.henderson@linaro.org> References: <20230901022331.115247-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Since alpha binaries are generally built for multiple page sizes, it is trivial to allow the page size to vary. Signed-off-by: Richard Henderson --- target/alpha/cpu-param.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/target/alpha/cpu-param.h b/target/alpha/cpu-param.h index 68c46f7998..c969cb016b 100644 --- a/target/alpha/cpu-param.h +++ b/target/alpha/cpu-param.h @@ -9,10 +9,22 @@ #define ALPHA_CPU_PARAM_H #define TARGET_LONG_BITS 64 -#define TARGET_PAGE_BITS 13 /* ??? EV4 has 34 phys addr bits, EV5 has 40, EV6 has 44. */ #define TARGET_PHYS_ADDR_SPACE_BITS 44 -#define TARGET_VIRT_ADDR_SPACE_BITS (30 + TARGET_PAGE_BITS) + +#ifdef CONFIG_USER_ONLY +/* + * Allow user-only to vary page size. Real hardware allows only 8k and 64k, + * but since any variance means guests cannot assume a fixed value, allow + * a 4k minimum to match x86 host, which can minimize emulation issues. + */ +# define TARGET_PAGE_BITS_VARY +# define TARGET_PAGE_BITS_MIN 12 +# define TARGET_VIRT_ADDR_SPACE_BITS 63 +#else +# define TARGET_PAGE_BITS 13 +# define TARGET_VIRT_ADDR_SPACE_BITS (30 + TARGET_PAGE_BITS) +#endif #endif