From patchwork Fri Mar 1 23:06:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 777123 Delivered-To: patch@linaro.org Received: by 2002:adf:e94d:0:b0:33d:f458:43ce with SMTP id m13csp1604610wrn; Fri, 1 Mar 2024 15:19:33 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXBAlmtxecJbe3yqhGEWQhGvu4gyRBFdX8n5DtLIiEuT0aZq9Gu7fRu2EnaLQAwblfqX8Zd4Oh90+n61Ds7iMQC X-Google-Smtp-Source: AGHT+IGJ7ueqDa8UdJI0qXygRhn1VMyrxDskWsPOBKmKMYr7tfu7SV+D6gXbQ9MCojaL76Jc7wNy X-Received: by 2002:a05:622a:1448:b0:42e:b87b:cb65 with SMTP id v8-20020a05622a144800b0042eb87bcb65mr4352966qtx.24.1709335173514; Fri, 01 Mar 2024 15:19:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1709335173; cv=none; d=google.com; s=arc-20160816; b=ZuOktHy/0GaKKlqAaaArhv+D6mPidSFKZ4UxPn3ieowmm6oDa0jDzZ/eXcwXf0uFkI 1pERNsDHCX+G8egMgBSZgflqYF1qXXT2DQ1RfVVMOnMdDLehqHDAHrgNWC1E+seZ/8xW G8kUt4MzLM9lz+Hnps3EFpL0em6tNYS+9vU62wDwMnX13KsIJsIyUbKawnUXnp1QF2Uj 3ja3XFtd1wNfLXbP05MobFCu3/fSHmT/W4mcCqrtBNUCL2ZKzkcloiV0qZnO9LZLkRRZ OczD+qJIFUVg6DBU9lbY9R1nvS9YIbAf8OtpYLIo+SwNo+yfjxYiSbouan1gN3t4vK7I lttw== 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=nZgxz9sv+Wfw3NEh+PaVP4+cTZIcAB3l+Ojbwy+/FqY=; fh=TypceWkQqZAd58MbMvFzjbJhJVwYT3Z2Jon575mPbgg=; b=jhYUzN/IlR6AtPoBqCWltU/DVsvA6HNLU90Ks9AkKAmC9citjdA+b4dvzk8aJBBXb+ rpxgfPSCP63W8lTavJr91QtMXYldKJLGPj/E0D/lAtLa/wp+SfsKjKeEETIaOsu/g+tp 2g+VvrVxsDi48zeIqVMbyx0aUbzXsHQj6vmfDkW0awx8JTg3u4iU3Ncgpy4SHQ8DXueu 4+iV0fPh4HotBoqUv5oUIjiCeuFKKtRLj2Ttyk1tkLiS7/F5Qi3Vw6Ligqnh5t6kDOOj wvDTpCOggQ7S3PuTJ5H2SfDhQvwUOzdkUdMqhVksLVsT+PK3vusj0ArJYpKzoxipSz/q pT4g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JoQqJsuk; 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 i1-20020ac87641000000b0042ebbd4d8aasi4117342qtr.260.2024.03.01.15.19.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Mar 2024 15:19:33 -0800 (PST) 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=JoQqJsuk; 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 1rgC2b-0005J1-6b; Fri, 01 Mar 2024 18:11:45 -0500 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 1rgC1g-0003x2-7u for qemu-devel@nongnu.org; Fri, 01 Mar 2024 18:10:52 -0500 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rgC1a-0005oY-GI for qemu-devel@nongnu.org; Fri, 01 Mar 2024 18:10:46 -0500 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-6e5dddd3b95so361791b3a.1 for ; Fri, 01 Mar 2024 15:10:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709334641; x=1709939441; 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=nZgxz9sv+Wfw3NEh+PaVP4+cTZIcAB3l+Ojbwy+/FqY=; b=JoQqJsukC/sdCxYeC04RI8lTFwT9Q/Vvt8iqAEY0Q5kIANSMH4MBIAfVoQJbl7l36n UseZ6Uoi8+2UH2Z56ltL0or42vOAZxeUBYiyBPJQ4n8+I1jpDchF7bgjSDjrdZK4lg1i xrikDcw4M/S7xOxE+PJOiPh73Ib18lkCnSzXqWn131Xx1J8xC+C08r2UuIzPMziq/CDb PYh272ZPZMvfTm4yjCNI4CFeqLCCgI/jzvAbQlRG5WpS0su4GSYNTAtdvvjOQkI4unrb xQZan7bcYGmC/SNNaQFv3HRmUMmfW73wVf1eHuYtM+unqU/jrwy7qmvq4Pt4eEJ43g7u /ymQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709334641; x=1709939441; 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=nZgxz9sv+Wfw3NEh+PaVP4+cTZIcAB3l+Ojbwy+/FqY=; b=FcJ7ehP3o66QutpPxtR9ZrZ8qDXIE70ZKObZktevcfy6yD8lU95S7lvqjCt9n4QJMH iZu3PL2DClbXayfkmKmNrHtedsGnfp2w7MDA1TXrCYsqKtEgpkV58BnOJ1+4BP78/zUO idB6RovnKIgSOsRSLnAYHR9KtALMyHxHyBZgR1CoB9Eo4eIQRhMbrnSPuJKz9Wtvw9qz TcHjFrC0fXF8yyP5hS5tgbuzKMdX477RysCJr41ccBeFp3CUbC3hPwgwPZeKBiahG2Fz 9UcDvuIHmFKPFQa3zJmCdk67CFeD15RmWgGdyFC/Dj0JW8QIrWfusuv3KKqJc+VYSFhs OcHg== X-Gm-Message-State: AOJu0YwO1bBYjTJE/piM/3NgKB4lt8wI+oW4lRFqnBl4VBUI7ABYMRLm 2JWYfFEnIFmNkshm5i/H1jca5T+q1Cmx6Ca6KBgr4RO++QrcEpNYy2ryhM+T+i9J70jbNqmPRBj T X-Received: by 2002:a05:6a21:2d09:b0:19e:3391:343b with SMTP id tw9-20020a056a212d0900b0019e3391343bmr8982155pzb.27.1709334641195; Fri, 01 Mar 2024 15:10:41 -0800 (PST) Received: from stoup.. (098-147-055-211.res.spectrum.com. [98.147.55.211]) by smtp.gmail.com with ESMTPSA id c2-20020a634e02000000b005e438fe702dsm3449407pgb.65.2024.03.01.15.10.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 15:10:40 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Ilya Leoshkevich , Helge Deller Subject: [PATCH 53/60] target/alpha: Enable TARGET_PAGE_BITS_VARY for user-only Date: Fri, 1 Mar 2024 13:06:12 -1000 Message-Id: <20240301230619.661008-54-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240301230619.661008-1-richard.henderson@linaro.org> References: <20240301230619.661008-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42e; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42e.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, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=0.01 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 Reviewed-by: Pierrick Bouvier Reviewed-by: Ilya Leoshkevich Acked-by: Helge Deller Message-Id: <20240102015808.132373-34-richard.henderson@linaro.org> --- 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