From e1bffbf7dfeb2aca07f484ef42ae73d3c99b5558 Mon Sep 17 00:00:00 2001 From: Aaron Lindsay Date: Thu, 26 Apr 2018 09:06:56 -0400 Subject: [PATCH] target/arm: Check PMCNTEN for whether PMCCNTR is enabled Backports commit ccbc0e338486b21cb0eb52e52cd309bbbe6a7507 from qemu --- qemu/target/arm/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu/target/arm/helper.c b/qemu/target/arm/helper.c index 28bded4d..bdde85f9 100644 --- a/qemu/target/arm/helper.c +++ b/qemu/target/arm/helper.c @@ -889,7 +889,7 @@ static inline bool arm_ccnt_enabled(CPUARMState *env) { /* This does not support checking PMCCFILTR_EL0 register */ - if (!(env->cp15.c9_pmcr & PMCRE)) { + if (!(env->cp15.c9_pmcr & PMCRE) || !(env->cp15.c9_pmcnten & (1 << 31))) { return false; }