From: Richard Henderson Date: Fri, 26 Sep 2025 00:11:29 +0000 (-0700) Subject: target/arm: GPT_Secure is reserved without FEAT_SEL2 X-Git-Tag: v10.2.0-rc1~74^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11dee1cb2f075185ed93b38ad964995290630041;p=thirdparty%2Fqemu.git target/arm: GPT_Secure is reserved without FEAT_SEL2 For GPT_Secure, if SEL2 is not enabled, raise a GPCF_Walk exception. Signed-off-by: Richard Henderson Reviewed-by: Pierrick Bouvier Message-id: 20250926001134.295547-6-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- diff --git a/target/arm/ptw.c b/target/arm/ptw.c index 1cafe8f4f7..3df5d4da12 100644 --- a/target/arm/ptw.c +++ b/target/arm/ptw.c @@ -478,10 +478,14 @@ static bool granule_protection_check(CPUARMState *env, uint64_t paddress, break; case 0b1111: /* all access */ return true; - case 0b1000: - case 0b1001: - case 0b1010: - case 0b1011: + case 0b1000: /* secure */ + if (!cpu_isar_feature(aa64_sel2, cpu)) { + goto fault_walk; + } + /* fall through */ + case 0b1001: /* non-secure */ + case 0b1010: /* root */ + case 0b1011: /* realm */ if (pspace == (gpi & 3)) { return true; }