From nobody Wed Jan 7 09:14:35 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=1767201054; cv=none; d=zohomail.com; s=zohoarc; b=R3HX2wf36he+Dr+dpHFe2kLNt8vzkmSl1Y67jXotAWY9ghVLbqqn4gaT6HOEMEKVn0jNBe6wm5NdFs/6QZmeJ2tJEu3JoZ9+y9h2j6pL0M7R+bxEv8xPbMwE2taBQZ0JhLM47DqQVV4tiJDy6trMml/qml0aqKLfetCvXh2glfE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1767201054; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=q9gRGfWHfjtxXAmgTOBvA8NGElHsA6CC6jlKP1KrJHU=; b=JsLLguaJf0IEzIXiUxpdV0WzSLGGcKhxxaIL7IFtBM/vbzUaQgjbLcH2kdjdhDL9IX9Tv7Z5v/PXYj6xkh/sXav2UKrgomrAZiwis/D6vEgVzNxLweU5b0yoYP9T6azuSeNmHyn/4i1M2N5XUMxOKJFq3k8nFzIOZRdPxrorJ2Y= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1767201054050652.1800739865492; Wed, 31 Dec 2025 09:10:54 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vazhD-0002Xi-44; Wed, 31 Dec 2025 12:09:15 -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 1vazh7-0002WK-GN for qemu-devel@nongnu.org; Wed, 31 Dec 2025 12:09:09 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vazh3-0000Yq-Dd for qemu-devel@nongnu.org; Wed, 31 Dec 2025 12:09:08 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-47d3ffa5f33so22649345e9.2 for ; Wed, 31 Dec 2025 09:09:02 -0800 (PST) Received: from mnementh.archaic.org.uk (f.7.f.1.7.5.e.f.f.f.c.5.d.8.2.4.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:1d0:0:428d:5cff:fe57:1f7f]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4324eaa64cesm75208990f8f.35.2025.12.31.09.09.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Dec 2025 09:09:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767200941; x=1767805741; 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=q9gRGfWHfjtxXAmgTOBvA8NGElHsA6CC6jlKP1KrJHU=; b=AIbkHfikit2Tz2jZ7cC0XshiFuKbP1gj8li2ZetagS0b6N5Oxri+9lurnvFyQwNODq iBqqk/waKooO+KCXtG/exEqg2Uu7cUpAU6sPY0GFT4vBvOEv7WlAgzoujQj10jt6UdX7 2S2fOQhJLRZiEYVzRsIJi7HYLMrmz6B0g5oChp/qwUlSlIo7FGBeu8adMHDqOLprvGbt 99F/YR9yq+zyEvYzg/kU7QmxusEx+n6QJZfufZPrbxNefASxjR5IK84WrRNZ4ZuJesED lzWvQHOTFGZgk5dfxvEifc3Rd9nlo8xb6VzA2bz680cGY+s+O2zPcDKauw4erweXyY4R Zzbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767200941; x=1767805741; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=q9gRGfWHfjtxXAmgTOBvA8NGElHsA6CC6jlKP1KrJHU=; b=jXdO+rn/ktCYft3IhvVpQGBvcoedZtVMT5v3g9nRBimi4S70A1BlT42gskoSx5CzmA lqygRZ3Jz0Aj2Jls8y18LLaJBNs7Yj1KHpac9acGRR9v2YZ0h5uomuFemQupxjtH4aUp /qkS7OYGt8G+JgxvsxFxzy2IZLx1nnGlwVcVRc4eKuUq2+rMOLRMfweQn52gAuFRpeXF IjJ+8l7HnUFOPKAj+2YpRXXxZUz27DdnGkwC8ErQFU9HhQtXZWGE3BYDLtuoXIzDd7vN CpJw1gy1152MM8Elz5gg0E/HFsFWmCn2tH5/KTrj/84EQihEo0OZHFvghVR02ncD4kNo K9OQ== X-Forwarded-Encrypted: i=1; AJvYcCWAOJgGx/s3cyfBdlS3dEKH9Dlxnv9ej6KczWx2CCwEsVcxKr5Qp7B0sfGGQjXPmowMCvXi2IRAZqpQ@nongnu.org X-Gm-Message-State: AOJu0YyWDShAwZjHb5+FEhVGcOBoGmYdExOPH6EATcnPVhUu35L2Vbqh kD4WRmsW4M/ixj5SPYghFxDnjeqTT0ZdESCxw5Nw1DmEY2CenB8pQczh/Nn6ZmFZD0Y= X-Gm-Gg: AY/fxX4pc9JUlVvuGJNFadLcMXZTnT8ZRTST1BNuihV6atRfUJqMsZG7KEwJHsW3Qw2 ameUMtYjkr0LVLd/prOqtMabSJv3RXHwgruaVtVPwcZ4eTWoA/vjWVXmzB3ZZ6ZFn2YWbRxiIjl 2ioCoiSk/MWfTQtBDeL/CzKEeuGS/bqPC5UdYUwuSlDmP6873UQlx+C3waGQwnqtgr2HTNQ6hKh 2KCUsNSLqUkHvc6tmWL8vE3WF6aPlUTFpBZifVIjqqJF/x25a7AZw4D7SLbyQxvp4OfOtCbwpVL Yb+N4ujoBHDMQzue3EaW4VSoNaN3qNs2mCblZ1vpafJQLWE8d4HIxQvD4R+VUCTSKxBsbDdV4D8 yckuPb4CLq2RzDTMRDEDbV+1W4L92QXfcV07nwSfw2lAKjWRpNg2gSeS0GxeDE8N3FsdKJZM5EP hT0mfIHcLIlJBCgWQG6QlGGftFzANjAnIFKP9D3SJEJJDuFGjinYUJdS3T+Cyrcm5PnFuzXviMF udfRpsLNfu8eR6NbUCfzLybo/ZIIsOOyHnesTyY/YtbebBEkqXgc6ee X-Google-Smtp-Source: AGHT+IECmRubD8LCUNFDp3y5YP+oy96ChnImbpffFYz3jUA9OxD/Tvx3VADR56J43xIUN/Ndw4I98Q== X-Received: by 2002:a05:600c:350b:b0:471:1774:3003 with SMTP id 5b1f17b1804b1-47d1958ef07mr395042785e9.29.1767200941115; Wed, 31 Dec 2025 09:09:01 -0800 (PST) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org Subject: [PATCH 1/4] target/arm: Don't specify ID_PFR1 accessfn twice Date: Wed, 31 Dec 2025 17:08:55 +0000 Message-ID: <20251231170858.254594-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251231170858.254594-1-peter.maydell@linaro.org> References: <20251231170858.254594-1-peter.maydell@linaro.org> 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=lists.gnu.org; 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=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x329.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=unavailable 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1767201055421158500 Content-Type: text/plain; charset="utf-8" In the definition of ID_PFR1 we have an ifdef block; we specify the accessfn once in the common part of the ifdef and once in the not-user-only part, which is redundant but harmless. The accessfn will always return success in user-only mode (because we won't trap to EL2), so specify it only in the not-user-only half of the ifdef, as was probably the intention. This is only cc'd to stable to avoid a textual conflict with the following patch, which is a bug fix. Cc: qemu-stable@nongnu.org Fixes: 0f150c8499e970bd ("target/arm: Constify ID_PFR1 on user emulation") Signed-off-by: Peter Maydell Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson --- target/arm/helper.c | 1 - 1 file changed, 1 deletion(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 27ebc6f29b..ec82ea6203 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -6296,7 +6296,6 @@ void register_cp_regs_for_features(ARMCPU *cpu) { .name =3D "ID_PFR1", .state =3D ARM_CP_STATE_BOTH, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 1, .opc2 =3D = 1, .access =3D PL1_R, .type =3D ARM_CP_NO_RAW, - .accessfn =3D access_aa32_tid3, #ifdef CONFIG_USER_ONLY .type =3D ARM_CP_CONST, .resetvalue =3D GET_IDREG(isar, ID_PFR1), --=20 2.47.3 From nobody Wed Jan 7 09:14:35 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=1767201075; cv=none; d=zohomail.com; s=zohoarc; b=DETLNL7Pd71uRVedgcbgwvh9P8OMEXlyk5PvcyvMzWvQjZZP1iUGG1mmehtdQCMFVYsE384dbtsk9aDI4RC0jMG9kQVdrbJyMBZC+tJrEZJtJQQw22ClkGZtgvCq38gbuVxv5kRUlCmulLj7rBl6TjnNHEBwaelpZF7srP1lqG8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1767201075; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=AiTH0WXDhB71cHRZd1RTUOWk3bvV4V7fuZHHwsuReiA=; b=b4AjbcRDpKue/vLmFlNGUpxMXefb9g8D+WAnY3GijPDZqNob9V9IKyJLGqz6Py+UzsAOZODpsJoTRit3cz1+v1hcwsuhRaHdspr8rWz337ZzpE//TAf56rl7pl9Un5RTwjHP56G3wDAmfSfGQ7DI0U4YDs/mZAPBBFbPM5Kavks= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1767201075046294.1334925278903; Wed, 31 Dec 2025 09:11:15 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vazhH-0002bJ-Cr; Wed, 31 Dec 2025 12:09:19 -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 1vazhB-0002Xa-A8 for qemu-devel@nongnu.org; Wed, 31 Dec 2025 12:09:14 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vazh5-0000ZA-Av for qemu-devel@nongnu.org; Wed, 31 Dec 2025 12:09:11 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4779ce2a624so84253585e9.2 for ; Wed, 31 Dec 2025 09:09:03 -0800 (PST) Received: from mnementh.archaic.org.uk (f.7.f.1.7.5.e.f.f.f.c.5.d.8.2.4.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:1d0:0:428d:5cff:fe57:1f7f]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4324eaa64cesm75208990f8f.35.2025.12.31.09.09.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Dec 2025 09:09:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767200942; x=1767805742; 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=AiTH0WXDhB71cHRZd1RTUOWk3bvV4V7fuZHHwsuReiA=; b=K/bNqU7FizYv6HZer8plFuJo2LqjutumIaAeMJTTafwugZFa8CKaZZfs1zgafe7IHM h/4d9knpaGY3XymmdqFVnfdT/8Yd6LHGamHcoeAPYa50uSzL6HJ04ko/yLnCeIP5bW9r Nb1B1y+MdM/cB+c16n3qag9a8GXqnzOpfBIZEyvpLlcYAtzQC7hB6zyKl9skcrvHGlmG LgPQVAHW24vXEkeol/iyX5TMI11fvXLB068WKF6JFJayt4qQFnL4NAcYwiKEn1yXUQ6+ pcwLOk6KVxJyLAPZJxXA3KmQN/uTlvk8Tbo2/s6q0O1yGtjtliYOpppnFf/EILOZd9zH pLCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767200942; x=1767805742; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=AiTH0WXDhB71cHRZd1RTUOWk3bvV4V7fuZHHwsuReiA=; b=wifdPR25D6n02z0q6DnTVdCDx57onZJFRS6Ec6oX/FdN2dZEhB8SNYnSrc23rXj1BC +kuULaZn0mgvNgaKwxpQXyn/6uVHLx+n8886Bxb4fdP5AOQ/RnrvsnIldshnMIWKmj8Y /sUgNmphahUzGech2nhg6knvnmkaU2Mvetnly4RQu5RV7GzAPoxNFtWzttnUgv/2gpEg s/DLS1EWOUvtAHIwwER/rl99AV/+on3tKDbnOEuGOL1bTal4Al2Q4y4Dz/VWUZFtJmrC /EdtKnaJ9dBGZrT6j96GjRYFGI99Ozb/wcG/dEo23tPqck523QpyKGWPDa8bqNa6/sO5 Qdjg== X-Forwarded-Encrypted: i=1; AJvYcCV5mwnuKmQBCeAnYtbIiK/u8zFZHMEaq34gTdCf+hZdvstzuw+jKsAgKmLrZ+l1dc6bvt9uvJNES5KJ@nongnu.org X-Gm-Message-State: AOJu0YzBh6cAJoEnwLd/sBv0pvnznL5gGraybigjSx4NonCOjtC8EZcu EZE9a6KuNGhOMwUMw+KU8/RyNdu+nfs4pEc8NB7t1op8CF6s9XV8+Zd2RFCrltdMgx548lbWetp HBM00 X-Gm-Gg: AY/fxX7VDcmeLGVWaxf6TDeF8xvi5M5EnpR+VjWHXQweofxNOI4CWpI0BnInd0X57+O DCBh2ugNsU8MqUXuSHvqVwj7DcZWYyFjrk3Z+sfMWzCwpmUuQ2HNp6rQPMfn7oKchMaGdGw59KP fSy+oEjZh/C/7JyRhBrr7Dvixl6L29RlsEiE/2TKaICdrxBqX6EUUGEXWYIFklKmVrEhh4XPiOA t47l5CRY+EYt9LxjyesDvpsezuvICSWGl8OTi9TZLjj3wfi3zGvbEFjrKcfu8X8Yw9MrRLsbiuB nhJDs9BCjqU23ekWfijDKyAn58gZnxDOA4GnwOdyXbDO98g0AAN1ZJ5Eet3kQSS3bzgE/RNAEMR yRWsB3TtdTf37rQKs1rNiZJ0S8lMHWHSBOCMfqd3HOGJfWeSKwOlfmVwf3N/+zcr20GLXML+qeu H7Ds7+uu1gEZn/me+Fmjez8p5vEwOT/U+u3AnLcaLZs2y5+cTbO2cdPvOmLSbbKFHqszNohJNFQ Gjzv/KniAdWGsYHwAKwtJMVatOUAMb/rje8Jsx7bfzOq6itWdOo75tJ X-Google-Smtp-Source: AGHT+IG4SU+YSHcopM+q2gV5rm9MFoLy8bRfRgW5o3cXKFufVh6XRhiCw4Ou1PbbHVmmSQ/ul0S/lA== X-Received: by 2002:a05:6000:2285:b0:430:f494:6abb with SMTP id ffacd0b85a97d-4324e4c63f9mr39180811f8f.8.1767200942032; Wed, 31 Dec 2025 09:09:02 -0800 (PST) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org Subject: [PATCH 2/4] target/arm: Correctly honour HCR.TID3 for v7A cores Date: Wed, 31 Dec 2025 17:08:56 +0000 Message-ID: <20251231170858.254594-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251231170858.254594-1-peter.maydell@linaro.org> References: <20251231170858.254594-1-peter.maydell@linaro.org> 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=lists.gnu.org; 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=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x334.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=unavailable 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1767201077430158500 Content-Type: text/plain; charset="utf-8" The HCR.TID3 bit defines that we should trap to the hypervisor for reads to a collection of ID registers. Different architecture versions have defined this differently: * v7A has a set of ID regs that definitely must trap: - ID_PFR{0,1}, ID_DFR0, ID_AFR0, ID_MMFR{0,1,2,3}, ID_ISAR{0,1,2,3,4,5}, MVFR{0,1} and somewhat vaguely says that "there is no requirement" to trap for registers that are reserved in the ID reg space (i.e. which RAZ and might be used for new ID regs in future) * v8A adds to this list: - ID_PFR2 and MVFR2 must trap - ID_MMFR4, ID_MMFR5, ID_ISAR6, ID_DFR1 and reserved registers in the ID reg space must trap if FEAT_FGT is implemented, and it is IMPDEF if they trap if FEAT_FGT is not implemented In QEMU we seem to have attempted to implement this distinction (taking the "we do trap" IMPDEF choice if no FEAT_FGT), with access_aa64_tid3() always trapping on TID3 and access_aa32_tid3() trapping only if ARM_FEATURE_V8 is set. However, we didn't apply these to the right set of registers: we use access_aa32_tid3() on all the 32-bit ID registers *except* ID_PFR2, ID_DFR1, ID_MMFR5 and the RES0 space, which means that for a v7 CPU we don't trap on a lot of registers that we should trap on, and we do trap on various things that the v7A Arm ARM says there is "no requirement" to trap on. Straighten this out by naming the access functions more clearly for their purpose, and documenting this: access_v7_tid3() is only for the fixed set of ID registers that v7A traps on HCR.TID3, and access_tid3() is for any others, including the reserved encoding spaces and any new registers we add in future. AArch32 MVFR2 access is handled differently, in check_hcr_el2_trap; there we already do not trap on TID3 on v7A cores (where MVFR2 doesn't exist), because we in the code-generation function we UNDEF if ARM_FEATURE_V8 is not set, without generating code to call check_hcr_el2_trap. This bug was causing a problem for Xen which (after a recent change to Xen) expects to be able to trap ID_PFR0 on a Cortex-A15. The result of these changes is that our v8A behaviour remains the same, and on v7A we now trap the registers the Arm ARM definitely requires us to trap, and don't trap the reserved space that "there is no requirement" to trap. Cc: qemu-stable@nongnu.org Fixes: 6a4ef4e5d1084c ("target/arm: Honor HCR_EL2.TID3 trapping requirement= s") Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- target/arm/helper.c | 146 ++++++++++++++++++++++++-------------------- 1 file changed, 81 insertions(+), 65 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index ec82ea6203..c4f73eb3f3 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -5835,9 +5835,18 @@ static const ARMCPRegInfo ccsidr2_reginfo[] =3D { .readfn =3D ccsidr2_read, .type =3D ARM_CP_NO_RAW }, }; =20 -static CPAccessResult access_aa64_tid3(CPUARMState *env, const ARMCPRegInf= o *ri, - bool isread) +static CPAccessResult access_v7_tid3(CPUARMState *env, const ARMCPRegInfo = *ri, + bool isread) { + /* + * Trap on TID3 always. This should be used only for the fixed set of + * registers which are defined to trap on HCR.TID3 in v7A, which is: + * ID_PFR{0,1}, ID_DFR0, ID_AFR0, ID_MMFR{0,1,2,3}, ID_ISAR{0,1,2,3,= 4,5} + * (MVFR0 and MVFR1 also trap in v7A, but this is not handled via + * this accessfn but in check_hcr_el2_trap.) + * Any other registers in the TID3 trap space should use access_tid3(), + * so that they trap on v8 and above, but not on v7. + */ if ((arm_current_el(env) < 2) && (arm_hcr_el2_eff(env) & HCR_TID3)) { return CP_ACCESS_TRAP_EL2; } @@ -5845,11 +5854,18 @@ static CPAccessResult access_aa64_tid3(CPUARMState = *env, const ARMCPRegInfo *ri, return CP_ACCESS_OK; } =20 -static CPAccessResult access_aa32_tid3(CPUARMState *env, const ARMCPRegInf= o *ri, - bool isread) +static CPAccessResult access_tid3(CPUARMState *env, const ARMCPRegInfo *ri, + bool isread) { + /* + * Trap on TID3, if we implement at least v8. For v8 and above + * the ID register space is at least IMPDEF permitted to trap, + * and must trap if FEAT_FGT is implemented. We choose to trap + * always. Use this function for any new registers that should + * trap on TID3. + */ if (arm_feature(env, ARM_FEATURE_V8)) { - return access_aa64_tid3(env, ri, isread); + return access_v7_tid3(env, ri, isread); } =20 return CP_ACCESS_OK; @@ -6287,7 +6303,7 @@ void register_cp_regs_for_features(ARMCPU *cpu) { .name =3D "ID_PFR0", .state =3D ARM_CP_STATE_BOTH, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 1, .opc2 =3D = 0, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa32_tid3, + .accessfn =3D access_v7_tid3, .resetvalue =3D GET_IDREG(isar, ID_PFR0)}, /* * ID_PFR1 is not a plain ARM_CP_CONST because we don't know @@ -6301,7 +6317,7 @@ void register_cp_regs_for_features(ARMCPU *cpu) .resetvalue =3D GET_IDREG(isar, ID_PFR1), #else .type =3D ARM_CP_NO_RAW, - .accessfn =3D access_aa32_tid3, + .accessfn =3D access_v7_tid3, .readfn =3D id_pfr1_read, .writefn =3D arm_cp_write_ignore #endif @@ -6309,72 +6325,72 @@ void register_cp_regs_for_features(ARMCPU *cpu) { .name =3D "ID_DFR0", .state =3D ARM_CP_STATE_BOTH, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 1, .opc2 =3D = 2, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa32_tid3, + .accessfn =3D access_v7_tid3, .resetvalue =3D GET_IDREG(isar, ID_DFR0)}, { .name =3D "ID_AFR0", .state =3D ARM_CP_STATE_BOTH, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 1, .opc2 =3D = 3, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa32_tid3, + .accessfn =3D access_v7_tid3, .resetvalue =3D GET_IDREG(isar, ID_AFR0)}, { .name =3D "ID_MMFR0", .state =3D ARM_CP_STATE_BOTH, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 1, .opc2 =3D = 4, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa32_tid3, + .accessfn =3D access_v7_tid3, .resetvalue =3D GET_IDREG(isar, ID_MMFR0)}, { .name =3D "ID_MMFR1", .state =3D ARM_CP_STATE_BOTH, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 1, .opc2 =3D = 5, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa32_tid3, + .accessfn =3D access_v7_tid3, .resetvalue =3D GET_IDREG(isar, ID_MMFR1)}, { .name =3D "ID_MMFR2", .state =3D ARM_CP_STATE_BOTH, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 1, .opc2 =3D = 6, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa32_tid3, + .accessfn =3D access_v7_tid3, .resetvalue =3D GET_IDREG(isar, ID_MMFR2)}, { .name =3D "ID_MMFR3", .state =3D ARM_CP_STATE_BOTH, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 1, .opc2 =3D = 7, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa32_tid3, + .accessfn =3D access_v7_tid3, .resetvalue =3D GET_IDREG(isar, ID_MMFR3)}, { .name =3D "ID_ISAR0", .state =3D ARM_CP_STATE_BOTH, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 2, .opc2 =3D = 0, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa32_tid3, + .accessfn =3D access_v7_tid3, .resetvalue =3D GET_IDREG(isar, ID_ISAR0)}, { .name =3D "ID_ISAR1", .state =3D ARM_CP_STATE_BOTH, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 2, .opc2 =3D = 1, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa32_tid3, + .accessfn =3D access_v7_tid3, .resetvalue =3D GET_IDREG(isar, ID_ISAR1)}, { .name =3D "ID_ISAR2", .state =3D ARM_CP_STATE_BOTH, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 2, .opc2 =3D = 2, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa32_tid3, + .accessfn =3D access_v7_tid3, .resetvalue =3D GET_IDREG(isar, ID_ISAR2)}, { .name =3D "ID_ISAR3", .state =3D ARM_CP_STATE_BOTH, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 2, .opc2 =3D = 3, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa32_tid3, + .accessfn =3D access_v7_tid3, .resetvalue =3D GET_IDREG(isar, ID_ISAR3) }, { .name =3D "ID_ISAR4", .state =3D ARM_CP_STATE_BOTH, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 2, .opc2 =3D = 4, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa32_tid3, + .accessfn =3D access_v7_tid3, .resetvalue =3D GET_IDREG(isar, ID_ISAR4) }, { .name =3D "ID_ISAR5", .state =3D ARM_CP_STATE_BOTH, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 2, .opc2 =3D = 5, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa32_tid3, + .accessfn =3D access_v7_tid3, .resetvalue =3D GET_IDREG(isar, ID_ISAR5) }, { .name =3D "ID_MMFR4", .state =3D ARM_CP_STATE_BOTH, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 2, .opc2 =3D = 6, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa32_tid3, + .accessfn =3D access_tid3, .resetvalue =3D GET_IDREG(isar, ID_MMFR4)}, { .name =3D "ID_ISAR6", .state =3D ARM_CP_STATE_BOTH, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 2, .opc2 =3D = 7, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa32_tid3, + .accessfn =3D access_tid3, .resetvalue =3D GET_IDREG(isar, ID_ISAR6) }, }; define_arm_cp_regs(cpu, v6_idregs); @@ -6425,7 +6441,7 @@ void register_cp_regs_for_features(ARMCPU *cpu) .resetvalue =3D GET_IDREG(isar, ID_AA64PFR0) #else .type =3D ARM_CP_NO_RAW, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .readfn =3D id_aa64pfr0_read, .writefn =3D arm_cp_write_ignore #endif @@ -6433,172 +6449,172 @@ void register_cp_regs_for_features(ARMCPU *cpu) { .name =3D "ID_AA64PFR1_EL1", .state =3D ARM_CP_STATE_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 4, .opc2 =3D = 1, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D GET_IDREG(isar, ID_AA64PFR1)}, { .name =3D "ID_AA64PFR2_EL1", .state =3D ARM_CP_STATE_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 4, .opc2 =3D = 2, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D GET_IDREG(isar, ID_AA64PFR2)}, { .name =3D "ID_AA64PFR3_EL1_RESERVED", .state =3D ARM_CP_STAT= E_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 4, .opc2 =3D = 3, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D 0 }, { .name =3D "ID_AA64ZFR0_EL1", .state =3D ARM_CP_STATE_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 4, .opc2 =3D = 4, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D GET_IDREG(isar, ID_AA64ZFR0)}, { .name =3D "ID_AA64SMFR0_EL1", .state =3D ARM_CP_STATE_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 4, .opc2 =3D = 5, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D GET_IDREG(isar, ID_AA64SMFR0)}, { .name =3D "ID_AA64PFR6_EL1_RESERVED", .state =3D ARM_CP_STAT= E_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 4, .opc2 =3D = 6, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D 0 }, { .name =3D "ID_AA64PFR7_EL1_RESERVED", .state =3D ARM_CP_STAT= E_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 4, .opc2 =3D = 7, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D 0 }, { .name =3D "ID_AA64DFR0_EL1", .state =3D ARM_CP_STATE_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 5, .opc2 =3D = 0, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D GET_IDREG(isar, ID_AA64DFR0) }, { .name =3D "ID_AA64DFR1_EL1", .state =3D ARM_CP_STATE_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 5, .opc2 =3D = 1, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D GET_IDREG(isar, ID_AA64DFR1) }, { .name =3D "ID_AA64DFR2_EL1_RESERVED", .state =3D ARM_CP_STAT= E_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 5, .opc2 =3D = 2, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D 0 }, { .name =3D "ID_AA64DFR3_EL1_RESERVED", .state =3D ARM_CP_STAT= E_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 5, .opc2 =3D = 3, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D 0 }, { .name =3D "ID_AA64AFR0_EL1", .state =3D ARM_CP_STATE_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 5, .opc2 =3D = 4, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D GET_IDREG(isar, ID_AA64AFR0) }, { .name =3D "ID_AA64AFR1_EL1", .state =3D ARM_CP_STATE_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 5, .opc2 =3D = 5, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D GET_IDREG(isar, ID_AA64AFR1) }, { .name =3D "ID_AA64AFR2_EL1_RESERVED", .state =3D ARM_CP_STAT= E_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 5, .opc2 =3D = 6, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D 0 }, { .name =3D "ID_AA64AFR3_EL1_RESERVED", .state =3D ARM_CP_STAT= E_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 5, .opc2 =3D = 7, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D 0 }, { .name =3D "ID_AA64ISAR0_EL1", .state =3D ARM_CP_STATE_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 6, .opc2 =3D = 0, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D GET_IDREG(isar, ID_AA64ISAR0)}, { .name =3D "ID_AA64ISAR1_EL1", .state =3D ARM_CP_STATE_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 6, .opc2 =3D = 1, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D GET_IDREG(isar, ID_AA64ISAR1)}, { .name =3D "ID_AA64ISAR2_EL1", .state =3D ARM_CP_STATE_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 6, .opc2 =3D = 2, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D GET_IDREG(isar, ID_AA64ISAR2)}, { .name =3D "ID_AA64ISAR3_EL1_RESERVED", .state =3D ARM_CP_STA= TE_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 6, .opc2 =3D = 3, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D 0 }, { .name =3D "ID_AA64ISAR4_EL1_RESERVED", .state =3D ARM_CP_STA= TE_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 6, .opc2 =3D = 4, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D 0 }, { .name =3D "ID_AA64ISAR5_EL1_RESERVED", .state =3D ARM_CP_STA= TE_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 6, .opc2 =3D = 5, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D 0 }, { .name =3D "ID_AA64ISAR6_EL1_RESERVED", .state =3D ARM_CP_STA= TE_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 6, .opc2 =3D = 6, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D 0 }, { .name =3D "ID_AA64ISAR7_EL1_RESERVED", .state =3D ARM_CP_STA= TE_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 6, .opc2 =3D = 7, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D 0 }, { .name =3D "ID_AA64MMFR0_EL1", .state =3D ARM_CP_STATE_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 7, .opc2 =3D = 0, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D GET_IDREG(isar, ID_AA64MMFR0)}, { .name =3D "ID_AA64MMFR1_EL1", .state =3D ARM_CP_STATE_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 7, .opc2 =3D = 1, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D GET_IDREG(isar, ID_AA64MMFR1) }, { .name =3D "ID_AA64MMFR2_EL1", .state =3D ARM_CP_STATE_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 7, .opc2 =3D = 2, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D GET_IDREG(isar, ID_AA64MMFR2) }, { .name =3D "ID_AA64MMFR3_EL1", .state =3D ARM_CP_STATE_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 7, .opc2 =3D = 3, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D GET_IDREG(isar, ID_AA64MMFR3) }, { .name =3D "ID_AA64MMFR4_EL1_RESERVED", .state =3D ARM_CP_STA= TE_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 7, .opc2 =3D = 4, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D 0 }, { .name =3D "ID_AA64MMFR5_EL1_RESERVED", .state =3D ARM_CP_STA= TE_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 7, .opc2 =3D = 5, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D 0 }, { .name =3D "ID_AA64MMFR6_EL1_RESERVED", .state =3D ARM_CP_STA= TE_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 7, .opc2 =3D = 6, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D 0 }, { .name =3D "ID_AA64MMFR7_EL1_RESERVED", .state =3D ARM_CP_STA= TE_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 7, .opc2 =3D = 7, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D 0 }, { .name =3D "MVFR0_EL1", .state =3D ARM_CP_STATE_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 3, .opc2 =3D = 0, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D cpu->isar.mvfr0 }, { .name =3D "MVFR1_EL1", .state =3D ARM_CP_STATE_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 3, .opc2 =3D = 1, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D cpu->isar.mvfr1 }, { .name =3D "MVFR2_EL1", .state =3D ARM_CP_STATE_AA64, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 3, .opc2 =3D = 2, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D cpu->isar.mvfr2 }, /* * "0, c0, c3, {0,1,2}" are the encodings corresponding to @@ -6609,17 +6625,17 @@ void register_cp_regs_for_features(ARMCPU *cpu) { .name =3D "RES_0_C0_C3_0", .state =3D ARM_CP_STATE_AA32, .cp =3D 15, .opc1 =3D 0, .crn =3D 0, .crm =3D 3, .opc2 =3D 0, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D 0 }, { .name =3D "RES_0_C0_C3_1", .state =3D ARM_CP_STATE_AA32, .cp =3D 15, .opc1 =3D 0, .crn =3D 0, .crm =3D 3, .opc2 =3D 1, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D 0 }, { .name =3D "RES_0_C0_C3_2", .state =3D ARM_CP_STATE_AA32, .cp =3D 15, .opc1 =3D 0, .crn =3D 0, .crm =3D 3, .opc2 =3D 2, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D 0 }, /* * Other encodings in "0, c0, c3, ..." are STATE_BOTH because @@ -6630,27 +6646,27 @@ void register_cp_regs_for_features(ARMCPU *cpu) { .name =3D "RES_0_C0_C3_3", .state =3D ARM_CP_STATE_BOTH, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 3, .opc2 =3D = 3, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D 0 }, { .name =3D "ID_PFR2", .state =3D ARM_CP_STATE_BOTH, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 3, .opc2 =3D = 4, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D GET_IDREG(isar, ID_PFR2)}, { .name =3D "ID_DFR1", .state =3D ARM_CP_STATE_BOTH, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 3, .opc2 =3D = 5, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D GET_IDREG(isar, ID_DFR1)}, { .name =3D "ID_MMFR5", .state =3D ARM_CP_STATE_BOTH, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 3, .opc2 =3D = 6, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D GET_IDREG(isar, ID_MMFR5)}, { .name =3D "RES_0_C0_C3_7", .state =3D ARM_CP_STATE_BOTH, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 3, .opc2 =3D = 7, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D 0 }, }; #ifdef CONFIG_USER_ONLY @@ -6800,7 +6816,7 @@ void register_cp_regs_for_features(ARMCPU *cpu) .state =3D ARM_CP_STATE_AA32, .cp =3D 15, .opc1 =3D 0, .crn =3D 0, .crm =3D i, .opc2 =3D= CP_ANY, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid3, + .accessfn =3D access_tid3, .resetvalue =3D 0 }; define_one_arm_cp_reg(cpu, &v8_aa32_raz_idregs); } --=20 2.47.3 From nobody Wed Jan 7 09:14:35 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=1767201074; cv=none; d=zohomail.com; s=zohoarc; b=P2eqxdmGAnveSM2TIb3s2o5VDaiMDNdH5cwRGoEEggkfYoD7bgAraIuSk9pqIXXqeo06XVxCAbaw9oi/Sr2TbwZP1lWiq1SIvUCvugajbkOytNn6L/RGDZVNKDKX56KSNHfKgpRMDWpBOKpl4pmcPxydfNXmM8Lz3FN6bykf9qo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1767201074; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=faxhufLw/EIG5Ph8lvEbPCvkCLmmsEhf639jzh+lM9I=; b=oKQ7FYeuzqLpy8mYJYg1OXozeKnKH62fRqLZfXrMJM+UKdVpvfDV8Tu1htK30j5NbX1o3fPlk5YLnV3OgVQyjnWwhDbkvm0d8FBvoaLqqnD0QnvzBAEsoudDZjjxF5trvGNPLgJpiUaKdL+2wWKhGGlg3zp9kHadFOk4k6d4Eeg= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1767201074450710.5929376661687; Wed, 31 Dec 2025 09:11:14 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vazhH-0002bE-Bk; Wed, 31 Dec 2025 12:09:19 -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 1vazhB-0002Xc-An for qemu-devel@nongnu.org; Wed, 31 Dec 2025 12:09:14 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vazh5-0000ZK-Eq for qemu-devel@nongnu.org; Wed, 31 Dec 2025 12:09:12 -0500 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-42fb5810d39so6879226f8f.2 for ; Wed, 31 Dec 2025 09:09:04 -0800 (PST) Received: from mnementh.archaic.org.uk (f.7.f.1.7.5.e.f.f.f.c.5.d.8.2.4.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:1d0:0:428d:5cff:fe57:1f7f]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4324eaa64cesm75208990f8f.35.2025.12.31.09.09.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Dec 2025 09:09:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767200943; x=1767805743; 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=faxhufLw/EIG5Ph8lvEbPCvkCLmmsEhf639jzh+lM9I=; b=AUUDt5Z4pBP/n90KjE/vcSF7QMQtfRzV/NGMquWcrIIFXRB/IUePdMugA0ssOsOCJI duwmInoSvk4V/QP1l5mIqpvt4sqzzlXa6LYDiG4kwoDjDWCMEdmMFsXlSSxHPrgd0TqR QVskrLJuXSV3JqIX0LYkku1q8IC+cdJmAvwxlX5SJtPxjvY1XiDciGxE/xSGCaRr20fw ATSMGZKXNyzAKHpzfEfskZEOKAMF6PIPPxhiiHDMRTrgoVANY7EQxzlg23HXpCw4rfZG a3OH9EltI2xG4z9GNZ/9hNgYTi7VJjJxSWeMOOBtzQu8aejfFg4uZKvzLC0BfDCdp+ZR bN0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767200943; x=1767805743; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=faxhufLw/EIG5Ph8lvEbPCvkCLmmsEhf639jzh+lM9I=; b=re9L2WHJm0aJH2fg6aJYizeBt3OUGADczWsGRAqpiIbUkr4NsommtWIK73jOVv2x/2 XaDqAGHe5V2p9dwjitrluLMpSD8hXunBi96SQw7CcWBhHYsweR24jnaR4kO9257fqEAw O47tOA1/5col2oN0cgRJKJpIdngaIGb//bIa02oWWG7bKWAAwBYge6fcNWnjzeHQNKdZ 0fkdaYzPapWKplqiDt9dc5OUQm3PFPhWhtViEkeVooWOezLihNNhWR7v79yzLpXWmT82 ghFDTFQc0bLiG79DXKHuByYIRE/PFgY0iXzFv92sRJ0BOy8O4ddgiGT+6hi1iETFqnKH ajWA== X-Forwarded-Encrypted: i=1; AJvYcCU+z0Z3u2uqlSxwHZHaqTEP5xZHuFxWx7LyoYBST1D6uqNyEcZCWnI2cJDGBEnD+RAX5F/SqqV1qEoa@nongnu.org X-Gm-Message-State: AOJu0YxWoKUZh95Q6yA+3eZsyQdg25RSxSsyiCMgrZLvCRkS52c6EfeS +JKFMo3kT7xTe8YWGZYr6rSAE8WT9PJqyiZxAPTq2rFvgo6cP6nq7pU8dp4ttfQHDaM= X-Gm-Gg: AY/fxX6+Kw8iot/OqbbMU/zyg9CwahGLlYQ0zOklWn1aF5t96j4iRHG+TD33dv2uxEz Al7lPRgvCeNWbJ2VfANjCs9PYEpWY7vD5QfcW7SP5JRhUmimmCq5c0Y/4XPqvNqRHt8ah+W8Ldn FwjhiqZeKK5mAhBrRR782NQfHNzGeoxjW0D/UAPH9s4KiQXsw6HboiKpHdT8z0CeGzKiDDbZUS2 RMXFaa/p4N8dGbRRyZY2PxDeKOEGY4I9CM4FeikKNEtrDlhmcBCKWQr7IbPNgxmMRHaPMG4tk9/ ZsNTS8I6D9hkGZPJ0qVnxEI7LN48dd7bJL5uENy+2AFIks24SFCaQ2g7JXT3TtEXFS0cievpZ9A X1Py76FlyD7i4vZOEVL02KNeeNaZO5l6CooGeqtml9XrVq0E0oNpC2THfzBM50B32IQaTMr13u5 xIwVMBDeOGOyQzfM9bGhXZRBfliORgf7xNuqxJHTDi4kxRWa/jmc5NlW4Bp7ni6Ju9IfC6p6uYh PLWFeZJzwB04wnJa1N12wNGEbcUFmqG6QAKzM+KzvBmGg== X-Google-Smtp-Source: AGHT+IGVSVrvMOLQ+ITS353Z2MIs7pQPiWP+RahxI1tDpsL409+UZGMkoGrghgVPbRnsvsRqZGcAsA== X-Received: by 2002:a5d:5392:0:b0:42f:edb6:3642 with SMTP id ffacd0b85a97d-4324e704c03mr37383761f8f.60.1767200942921; Wed, 31 Dec 2025 09:09:02 -0800 (PST) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org Subject: [PATCH 3/4] target/arm: Correctly trap HCR.TID1 registers in v7A Date: Wed, 31 Dec 2025 17:08:57 +0000 Message-ID: <20251231170858.254594-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251231170858.254594-1-peter.maydell@linaro.org> References: <20251231170858.254594-1-peter.maydell@linaro.org> 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=lists.gnu.org; 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=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x431.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=unavailable 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1767201075358158500 Content-Type: text/plain; charset="utf-8" In v7A HCR.TID1 is defined to trap for TCMTR, TLBTR, REVIDR and AIDR. We incorrectly use an accessfn for REVIDR and AIDR that only traps on v8A cores. Fix this by collapsing access_aa64_tid1() and access_aa32_tid1() together and never doing a check for v8 vs v7. The accessfn is also used for SMIDR_EL1, which is fine as this register is AArch64 only. Cc: qemu-stable@nongnu.org Signed-off-by: Peter Maydell Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson --- target/arm/helper.c | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index c4f73eb3f3..0896e90965 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -924,8 +924,8 @@ static uint64_t isr_read(CPUARMState *env, const ARMCPR= egInfo *ri) return ret; } =20 -static CPAccessResult access_aa64_tid1(CPUARMState *env, const ARMCPRegInf= o *ri, - bool isread) +static CPAccessResult access_tid1(CPUARMState *env, const ARMCPRegInfo *ri, + bool isread) { if (arm_current_el(env) =3D=3D 1 && (arm_hcr_el2_eff(env) & HCR_TID1))= { return CP_ACCESS_TRAP_EL2; @@ -934,16 +934,6 @@ static CPAccessResult access_aa64_tid1(CPUARMState *en= v, const ARMCPRegInfo *ri, return CP_ACCESS_OK; } =20 -static CPAccessResult access_aa32_tid1(CPUARMState *env, const ARMCPRegInf= o *ri, - bool isread) -{ - if (arm_feature(env, ARM_FEATURE_V8)) { - return access_aa64_tid1(env, ri, isread); - } - - return CP_ACCESS_OK; -} - static const ARMCPRegInfo v7_cp_reginfo[] =3D { /* the old v6 WFI, UNPREDICTABLE in v7 but we choose to NOP */ { .name =3D "NOP", .cp =3D 15, .crn =3D 7, .crm =3D 0, .opc1 =3D 0, .o= pc2 =3D 4, @@ -969,7 +959,7 @@ static const ARMCPRegInfo v7_cp_reginfo[] =3D { { .name =3D "AIDR", .state =3D ARM_CP_STATE_BOTH, .opc0 =3D 3, .opc1 =3D 1, .crn =3D 0, .crm =3D 0, .opc2 =3D 7, .access =3D PL1_R, .type =3D ARM_CP_CONST, - .accessfn =3D access_aa64_tid1, + .accessfn =3D access_tid1, .fgt =3D FGT_AIDR_EL1, .resetvalue =3D 0 }, /* @@ -4997,7 +4987,7 @@ static const ARMCPRegInfo sme_reginfo[] =3D { .writefn =3D smcr_write, .raw_writefn =3D raw_write }, { .name =3D "SMIDR_EL1", .state =3D ARM_CP_STATE_AA64, .opc0 =3D 3, .opc1 =3D 1, .crn =3D 0, .crm =3D 0, .opc2 =3D 6, - .access =3D PL1_R, .accessfn =3D access_aa64_tid1, + .access =3D PL1_R, .accessfn =3D access_tid1, /* * IMPLEMENTOR =3D 0 (software) * REVISION =3D 0 (implementation defined) @@ -7094,7 +7084,7 @@ void register_cp_regs_for_features(ARMCPU *cpu) { .name =3D "REVIDR_EL1", .state =3D ARM_CP_STATE_BOTH, .opc0 =3D 3, .opc1 =3D 0, .crn =3D 0, .crm =3D 0, .opc2 =3D = 6, .access =3D PL1_R, - .accessfn =3D access_aa64_tid1, + .accessfn =3D access_tid1, .fgt =3D FGT_REVIDR_EL1, .type =3D ARM_CP_CONST, .resetvalue =3D cpu->revidr }, }; @@ -7118,7 +7108,7 @@ void register_cp_regs_for_features(ARMCPU *cpu) { .name =3D "TCMTR", .cp =3D 15, .crn =3D 0, .crm =3D 0, .opc1 =3D 0, .opc2 =3D 2, .access =3D PL1_R, - .accessfn =3D access_aa32_tid1, + .accessfn =3D access_tid1, .type =3D ARM_CP_CONST, .resetvalue =3D 0 }, }; /* TLBTR is specific to VMSA */ @@ -7126,7 +7116,7 @@ void register_cp_regs_for_features(ARMCPU *cpu) .name =3D "TLBTR", .cp =3D 15, .crn =3D 0, .crm =3D 0, .opc1 =3D 0, .opc2 =3D 3, .access =3D PL1_R, - .accessfn =3D access_aa32_tid1, + .accessfn =3D access_tid1, .type =3D ARM_CP_CONST, .resetvalue =3D 0, }; /* MPUIR is specific to PMSA V6+ */ --=20 2.47.3 From nobody Wed Jan 7 09:14:35 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=1767201064; cv=none; d=zohomail.com; s=zohoarc; b=IDKP6hXxPc663CcsfygNYpl+lLHjVdiqJypn32vcJZjrGk8YpldDr4wXnriXk5buS0X1WRBO0Q1pG7kiB7ZkDse9q8WtUW1H32/rcLzdKVKdYIBE8l51MDVm0grSzJbW/DkJHvTrwqVYYbvdyMCK/H8Se0qwNUdsMfhiDKZZ6lI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1767201064; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=7wt2aqGMGclkIIK53OA+IiWfT46ZDnd/x/s5IoZRUcU=; b=L9IO4L7tKoIxPrT7Dl168rF1I1hIbTSuIqyZ4mFKQV5GzMoQRJx/VVmoMe5ifF6N+JEbvDhTxiWHOU8FlfIeEs82XSAbggKGNY5Foq4BtwO0d2/FFNW33XlmM+ti/1mqgVKl7Kj+oHvx4d25Wgh+mZ2NlGPMdanZJOu94oGGPY4= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1767201064459560.0219486635712; Wed, 31 Dec 2025 09:11:04 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vazhI-0002cg-Da; Wed, 31 Dec 2025 12:09:20 -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 1vazhB-0002Xg-Cv for qemu-devel@nongnu.org; Wed, 31 Dec 2025 12:09:14 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vazh5-0000ZZ-Ce for qemu-devel@nongnu.org; Wed, 31 Dec 2025 12:09:11 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-47d3ba3a4deso29823415e9.2 for ; Wed, 31 Dec 2025 09:09:04 -0800 (PST) Received: from mnementh.archaic.org.uk (f.7.f.1.7.5.e.f.f.f.c.5.d.8.2.4.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:1d0:0:428d:5cff:fe57:1f7f]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4324eaa64cesm75208990f8f.35.2025.12.31.09.09.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Dec 2025 09:09:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767200944; x=1767805744; 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=7wt2aqGMGclkIIK53OA+IiWfT46ZDnd/x/s5IoZRUcU=; b=xWO9ll4EWLLmDXEvSmXu3psOwjMlAYug7d6lH2T1tg3s91k+mE3k/r3BR8g7ZJ40ix Kt1S07gHo1ZiMIdk/kwqQOpiWwsd3qHh4yWaI7GjBR9wCm9BRyuIerJ81Szz5MLnTCbd tWoT7PHTdOdTzIZB1ehiIEvlFcwh77zlcm8yVjFV43qFVbUtV+K4/Yv3cLjSsFQBRLs+ MacXfEgAFh/HVs3CtpqtDFuLo3l630YB9I5cK9hKKJtJ/KFpYEGw0Sef3CYGuYs6Cb+P z+AIezNpSnlckSn4ftsAYycrAMEu33w2Kiw6EGRHjyDMmvBBC2CwPInUr+GyXDXdRrLH +tuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767200944; x=1767805744; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=7wt2aqGMGclkIIK53OA+IiWfT46ZDnd/x/s5IoZRUcU=; b=rK4IWZC/TGMVfQpRUEmFsPIiyTGaZVbF1W1qyJnerh4uaH+WvNlKM/93fXe6UNI3+t 3QEbHwWoq6wSHUQ/NCdXQ6uPCxp184l+ns44Zxk7ppL8lGb94xEw8WKUxOUptVGmXeMX 4iNnWJVpXghZ999bNIHurH6DT564RyHYHi809CIL+Hpi/WUv11R2FTpal69yQUNPlNNI DxX/ge39KTh18BamyKqSOYGMZjMGAsd/AX0RKZupMOUtIBT9OqUaiE9WTMr1/xzF2Xjk x7tmlce0JtRytbCr5OygEkUU/ylqnqmttIAho5IxPK1eXeLCgbuADayuobNBy+bpggb5 t7tA== X-Forwarded-Encrypted: i=1; AJvYcCWhtU/0LIZdJ3DA/HZh/sgCp2zifrYbbd10CEmn/vRTnjmYGgdfU4gR+3hFnDkY9nSbeX97xQ5+ojoS@nongnu.org X-Gm-Message-State: AOJu0YzYULKx3f6X42ueJ64pbsgp9KRFJKQ4g4wc0p7N0zY2oyi3BgeT W8MIi+qawLaexgFSUjvxoWB+Wh3vdVZelJk4iw5KlcIvawVmXUKbXeRCpGUEa5XjXfR1T27bJJx Ta0eN X-Gm-Gg: AY/fxX4+CmrGMrERwA2Fap/dawKpIPPuxno7y1QVSVAIlMRa/BgMdx5aVcMnplwhIzX VRa30K/NtytxwILV3Y8HPYUu6POX1s1COGUv57zSVSgFMZ53UBWCzUJbV47uzschopI4FXFR+eX lBGuw6rxtVRKhq2+H+7knHds1smPL2S1zSK/vxPNCZr+ukK+ka2j6FoJhARmLgmcl6ENm/ErO0w OT3dxqfJeP3e10CLj+5C3PDfufXWBj0TwIMiLbFeulShjM252tMyFGv7F2ekGhLlln08KL2/frq n4mOaptsmZnSmXRXpl3ED/CzO2yCd7zR/LDNjKBXzKP9kzDMSe+GbV6w8RdQLU2PhYHmq+AiIF1 nLsTUraneCyPehEKlrHhqh6OzvnwLe4G5usJ9NANfM4JtuGk82bYm/QpQlIMhMdxhxTeOhOJXCj A4HUQdFAX0c8d3171P62mfzGmPTZJ4aadzBKQ0UdKPVjaT0UwNKQLIpzHte6kEX7bU3T6uioTPK bKA4RpBliEjCXhWX1XjVs1tokR70CfSHSoKv9gWHgDycQ== X-Google-Smtp-Source: AGHT+IGMgxrMaovXrFILA/hBFvv/tUB3hmHP8Ry4rbls5TFAvu9PWw/U7YS3NzlSJUlfwmMfjsUJ6g== X-Received: by 2002:a05:600c:6096:b0:479:3a88:de5f with SMTP id 5b1f17b1804b1-47d1959d6eemr399205855e9.36.1767200943762; Wed, 31 Dec 2025 09:09:03 -0800 (PST) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org Subject: [PATCH 4/4] target/arm: Rename access_aa64_tid5() to access_tid5() Date: Wed, 31 Dec 2025 17:08:58 +0000 Message-ID: <20251231170858.254594-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251231170858.254594-1-peter.maydell@linaro.org> References: <20251231170858.254594-1-peter.maydell@linaro.org> 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=lists.gnu.org; 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=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32d.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1767201065438158500 Content-Type: text/plain; charset="utf-8" There is no equivalent access_aa32_tid5() (HCR_EL2.TID5 only exists starting from v8); rename access_aa64_tid5() to access_tid5() to line up with the naming we now have for the TID1 and TID3 check functions. Signed-off-by: Peter Maydell Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson --- target/arm/helper.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 0896e90965..b914988ac9 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -5425,8 +5425,8 @@ static const ARMCPRegInfo dcpodp_reg[] =3D { .accessfn =3D aa64_cacheop_poc_access, .writefn =3D dccvap_writefn }, }; =20 -static CPAccessResult access_aa64_tid5(CPUARMState *env, const ARMCPRegInf= o *ri, - bool isread) +static CPAccessResult access_tid5(CPUARMState *env, const ARMCPRegInfo *ri, + bool isread) { if ((arm_current_el(env) < 2) && (arm_hcr_el2_eff(env) & HCR_TID5)) { return CP_ACCESS_TRAP_EL2; @@ -7449,7 +7449,7 @@ void register_cp_regs_for_features(ARMCPU *cpu) ARMCPRegInfo gmid_reginfo =3D { .name =3D "GMID_EL1", .state =3D ARM_CP_STATE_AA64, .opc0 =3D 3, .opc1 =3D 1, .crn =3D 0, .crm =3D 0, .opc2 =3D 4, - .access =3D PL1_R, .accessfn =3D access_aa64_tid5, + .access =3D PL1_R, .accessfn =3D access_tid5, .type =3D ARM_CP_CONST, .resetvalue =3D cpu->gm_blocksize, }; define_one_arm_cp_reg(cpu, &gmid_reginfo); --=20 2.47.3