target/arm: Drop secure check for HCR.TGE vs SCTLR_EL1.M
authorRichard Henderson <richard.henderson@linaro.org>
Sat, 1 Oct 2022 16:22:48 +0000 (09:22 -0700)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 10 Oct 2022 13:52:24 +0000 (14:52 +0100)
The effect of TGE does not only apply to non-secure state,
now that Secure EL2 exists.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20221001162318.153420-13-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/ptw.c

index a514a78c9240523aeb190ffb1926b84f287eae64..b3e0db19369034581d10a6e2db73c6d314498388 100644 (file)
@@ -157,8 +157,8 @@ static bool regime_translation_disabled(CPUARMState *env, ARMMMUIdx mmu_idx,
     case ARMMMUIdx_E10_0:
     case ARMMMUIdx_E10_1:
     case ARMMMUIdx_E10_1_PAN:
-        /* TGE means that NS EL0/1 act as if SCTLR_EL1.M is zero */
-        if (!is_secure && (hcr_el2 & HCR_TGE)) {
+        /* TGE means that EL0/1 act as if SCTLR_EL1.M is zero */
+        if (hcr_el2 & HCR_TGE) {
             return true;
         }
         break;