diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2022-10-01 09:22:39 -0700 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2022-10-10 14:52:24 +0100 |
commit | bf25b7b079c523c8eeebb35c0f914dd2cf3fba24 (patch) | |
tree | ef7e9264fd24c336a9d18e4705e94292b72d6b32 /target/arm | |
parent | c23f08a56cf01f947e2554339b42f641d5853d32 (diff) | |
download | qemu-bf25b7b079c523c8eeebb35c0f914dd2cf3fba24.zip qemu-bf25b7b079c523c8eeebb35c0f914dd2cf3fba24.tar.gz qemu-bf25b7b079c523c8eeebb35c0f914dd2cf3fba24.tar.bz2 |
target/arm: Fix S2 disabled check in S1_ptw_translate
Pass the correct stage2 mmu_idx to regime_translation_disabled,
which we computed afterward.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20221001162318.153420-4-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm')
-rw-r--r-- | target/arm/ptw.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/target/arm/ptw.c b/target/arm/ptw.c index 96ed8e1..631d1e2 100644 --- a/target/arm/ptw.c +++ b/target/arm/ptw.c @@ -200,10 +200,10 @@ static hwaddr S1_ptw_translate(CPUARMState *env, ARMMMUIdx mmu_idx, hwaddr addr, bool *is_secure, ARMMMUFaultInfo *fi) { + ARMMMUIdx s2_mmu_idx = *is_secure ? ARMMMUIdx_Stage2_S : ARMMMUIdx_Stage2; + if (arm_mmu_idx_is_stage1_of_2(mmu_idx) && - !regime_translation_disabled(env, ARMMMUIdx_Stage2)) { - ARMMMUIdx s2_mmu_idx = *is_secure ? ARMMMUIdx_Stage2_S - : ARMMMUIdx_Stage2; + !regime_translation_disabled(env, s2_mmu_idx)) { GetPhysAddrResult s2 = {}; int ret; |