From nobody Sat Sep 26 20:52:31 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1789208583; cv=none; d=zohomail.com; s=zohoarc; b=PYTqrbNYjqgaa+0Ak3aRtJo3XdxNR6Xy3cJh0d6iEZQDUI0smFAdrcX4xHMK2W2YJLsfWkEQPcekNsWyJj2rbFtMofdg2/l7qXzRAdtuPrMg+TAQG/4zUEr604+UGacIXkkHK1Crj6C3ifdK8Tvsz2BDr+/kzcSD5FF92ZpIUiE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1789208583; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=T+5eD0HNYqMz1DeaDmdnjOqjztQqntGhgVHGN/XhaFQ=; b=fAbK9dOf+aMYpE/E/8DScL4OkQpDMYw1ujm4S7J0xfwUHtMnKtn5EsiiCG2Culbg7nEZ+VR22SXzGokhwDREGSV7VNqGTzlYbttBXt2+VhsGfGJ3/Qm9ToqkPeGcXdUUwpd40QA+S4aS7Yaqngu2YjXIYYpp7hWVnM5hP9Gxvfo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1789208583940768.3934758197793; Sat, 12 Sep 2026 03:23:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1x5Ksq-0003Bz-GK; Sat, 12 Sep 2026 06:22:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1x5Ksp-0003Br-Nz for qemu-devel@nongnu.org; Sat, 12 Sep 2026 06:22:55 -0400 Received: from mail-pj2-x11.google.com ([2607:f8b0:4864:39::11]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1x5Kso-0005aB-3o for qemu-devel@nongnu.org; Sat, 12 Sep 2026 06:22:55 -0400 Received: by mail-pj2-x11.google.com with SMTP id 98e67ed59e1d1-39b9184fa80so569209a91.2 for ; Sat, 12 Sep 2026 03:22:53 -0700 (PDT) Received: from stoup ([2603:800c:7900:ed00:bf2d:a6f5:e308:cd27]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-33ba4ed295esm14445074eec.15.2026.09.12.03.22.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2026 03:22:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1789208572; x=1789813372; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=T+5eD0HNYqMz1DeaDmdnjOqjztQqntGhgVHGN/XhaFQ=; b=dJ4lvZnGba9ct8OdWlmiB2bAWhgFwf4WLZpJjp3RzX82GSAa9bUk5aRPfhThFnbUSR c7IDm+ZLE3Z8Mz8ia+xht0/yz4GKvWfWgfpiYog1A2PiBy122Uc9xTo7SIVM8mYTJi3s Gl49HT5YrXrsllvbTX3dllpbGE5IZ9fI6/QOhie1QeNWN1vCcre//H/UandRz6TdXopW Q5XNqYGyDgXr4uUo7aBY3+/0a4H/v1F62Hr5zVuksBzAajwoRDhqtYtyvXpmH14g7gre Kp4LGmfn8y0vXnQJOTBJZy/p8E2Q/Q1GDhu264sTvgoEpM89N9WqVphyuNaWQUmjQVz7 Q4ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1789208572; x=1789813372; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=T+5eD0HNYqMz1DeaDmdnjOqjztQqntGhgVHGN/XhaFQ=; b=eTeqshrazC0USQbFT5EZkrDrnPuyR4sDs4j3jzei/egPnxTDf9cw3T9clvQGEbIMXc OmOl5nvjoeZxhlvLrjnG71YBGhP4TUCsuQkUBWuc80BGCsf6oBsHZYugqOgaFmeWdVSe gOSBLWhzYJuOFconL/25AQ7HJKE6NlQVgvFzNCu5dTH1jodRYsUesOur/500ktyXPNI4 xyMzrkjuIT200zcEzvsAWkG2U/2Elnr0hQxqse4+3JQ6qy1rIxSK7m1imiL9/ZnBAPjK rQWWzmvUKhNiO4vqAw3Yu6OYixbuO8Nkrdf0qpXuiK3xDKDX0lw5UuGRM8KDCRz1MB7l Mc4Q== X-Gm-Message-State: AFuF++n6Wg3SqL8nxuTZQi+f/82oQbpk3CA6xuMHPnzp2RDDtz2kVNah YmEBSc4b9Avp5ILb2v2TrBedFdlnpBDAvukQcacz2CyViFm+FxYg7vzswH7aErg0tLF/9WNVGJN gPzQvhGU= X-Gm-Gg: AYBFou0nDXjpq7q4Zjc989ZPKhvm9uWizmedacSPuiQJejKeT/Z1Iqw0QBdLK8/pgaK r1QkrWgQ/k5hXP576qfvM6sAJU1s96oatBP9gOhlPSUWl3gDTM9R+3ri/tc/oyNRxvk/c9wrIQa V5wqU35CM1ZVLp3Ux603+eYD7/4cciZcMMA8oT5HfxaiYdBqFH9O3uONqY6Gl9O/RXhC8sRZr5P 2dm73GLb/J0/Xxwa2OZ+Eot2do+J4XEbxf+C6OcuIztdabppI3+hTB2PlVypr8JxKuT9utw1llZ rW0e9vF49L/LD1pNWAL0QxO/RSYuVt2BMd3bmeXH/ouPauds+kBOh9zqByyhusuGeluVGhI0W9u 7KOJw8v98X+OowrET5rGQjitdqByqKJZlrclBM+JjkL1Yp97CilsnfhHLNEmac4mTyK3bA5N3eF 3nGJDpcH7nzBmsr34o1npd2GIU2deyPIpCSGqq8MywaPhqzyO7tmoxl12G9RF3DwmvyYXMmR8eP fqKdhw= X-Received: by 2002:a17:90b:4fc5:b0:399:149a:3f27 with SMTP id 98e67ed59e1d1-39d9bd71246mr14946852a91.9.1789208572438; Sat, 12 Sep 2026 03:22:52 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PATCH] target/sparc: Enable variable page size for user-only Date: Sat, 12 Sep 2026 00:22:50 -1000 Message-ID: <20260912102250.597582-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.53.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:39::11; envelope-from=richard.henderson@linaro.org; helo=mail-pj2-x11.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, 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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1789208588498158500 Content-Type: text/plain; charset="utf-8" Sparc v8 has 4k pages, while Sparc v9 has 8k pages. Because of this, userland does not assumed a fixed page size (at least true for glibc and musl). Allowing the guest to follow the host page size avoids a variety of emulation problems. Signed-off-by: Richard Henderson Reviewed-by: Helge Deller --- target/sparc/cpu-param.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/target/sparc/cpu-param.h b/target/sparc/cpu-param.h index 7ec4ac84dbb..72aa89bf66a 100644 --- a/target/sparc/cpu-param.h +++ b/target/sparc/cpu-param.h @@ -8,7 +8,11 @@ #define SPARC_CPU_PARAM_H =20 #ifdef TARGET_SPARC64 -# define TARGET_PAGE_BITS 13 /* 8k */ +# ifdef CONFIG_USER_ONLY +# define TARGET_PAGE_BITS_VARY +# else +# define TARGET_PAGE_BITS 13 /* 8k */ +# endif # ifdef TARGET_ABI32 # define TARGET_VIRT_ADDR_SPACE_BITS 32 # else --=20 2.53.0