From: Aaron Lindsay <[email protected]>
This check was backwards when introduced in commit
033614c47de78409ad3fb39bb7bd1483b71c6789:
target/arm: Filter cycle counter based on PMCCFILTR_EL0
Cc: [email protected]
Signed-off-by: Aaron Lindsay <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
---
target/arm/helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/arm/helper.c b/target/arm/helper.c
index 44d666627a8..88bd9dd35da 100644
--- a/target/arm/helper.c
+++ b/target/arm/helper.c
@@ -1452,7 +1452,7 @@ static bool pmu_counter_enabled(CPUARMState *env, uint8_t
counter)
}
} else {
prohibited = arm_feature(env, ARM_FEATURE_EL3) &&
- (env->cp15.mdcr_el3 & MDCR_SPME);
+ !(env->cp15.mdcr_el3 & MDCR_SPME);
}
if (prohibited && counter == 31) {
--
2.20.1