From 511636a3f4e57dded9d95a1ff908bc926756ac83 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 1 Mar 2021 20:09:39 -0500 Subject: [PATCH] target/arm: Remove redundant mmu_idx lookup We already have the full ARMMMUIdx as computed from the function parameter. For the purpose of regime_has_2_ranges, we can ignore any difference between AccType_Normal and AccType_Unpriv, which would be the only difference between the passed mmu_idx and arm_mmu_idx_el. Backports 4aedfc0f633fd06dd2a5dc8ffa93f4c56117e37f --- qemu/target/arm/mte_helper.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qemu/target/arm/mte_helper.c b/qemu/target/arm/mte_helper.c index 29ca4aa2..ee6ba13b 100644 --- a/qemu/target/arm/mte_helper.c +++ b/qemu/target/arm/mte_helper.c @@ -538,8 +538,7 @@ static void mte_check_fail(CPUARMState *env, uint32_t desc, case 2: /* Tag check fail causes asynchronous flag set. */ - mmu_idx = arm_mmu_idx_el(env, el); - if (regime_has_2_ranges(mmu_idx)) { + if (regime_has_2_ranges(arm_mmu_idx)) { select = extract64(dirty_ptr, 55, 1); } else { select = 0;