target/arm/ptw: Flip sense of get_phys_addr_twostage return value
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20260515142541.571911-10-peter.maydell@linaro.org
Peter Maydell committed
May 15, 2026 at 15:25 UTC
7d95f750fa21dddd95e4ced7caf252b340de9c91
1 file changed
+4
-4
target/arm/ptw.c
+4
-4
@@ -3571,7 +3571,7 @@ static bool get_phys_addr_twostage(CPUARMState *env, S1Translate *ptw,
3571
3572
/* If S1 fails, return early. */
3573
if (ret) {
3574
- return ret;
3574
+ return !ret;
3575
}
3576
3577
ipa = result->f.phys_addr;
@@ -3602,7 +3602,7 @@ static bool get_phys_addr_twostage(CPUARMState *env, S1Translate *ptw,
3602
3603
/* If S2 fails, return early. */
3604
if (ret) {
3605
- return ret;
3605
+ return !ret;
3606
}
3607
3608
/*
@@ -3656,7 +3656,7 @@ static bool get_phys_addr_twostage(CPUARMState *env, S1Translate *ptw,
3656
result->f.attrs.space = arm_secure_to_space(result->f.attrs.secure);
3657
}
3658
3659
- return false;
3659
+ return true;
3660
}
3661
3662
static bool get_phys_addr_nogpc(CPUARMState *env, S1Translate *ptw,
@@ -3724,7 +3724,7 @@ static bool get_phys_addr_nogpc(CPUARMState *env, S1Translate *ptw,
3724
ptw->in_mmu_idx = mmu_idx = s1_mmu_idx;
3725
if (arm_feature(env, ARM_FEATURE_EL2) &&
3726
!regime_translation_disabled(env, ARMMMUIdx_Stage2, ptw->in_space)) {
3727
- return get_phys_addr_twostage(env, ptw, address, access_type,
3727
+ return !get_phys_addr_twostage(env, ptw, address, access_type,
3728
memop, result, fi);
3729
}
3730
/* fall through */