From ccbc0e338486b21cb0eb52e52cd309bbbe6a7507 Mon Sep 17 00:00:00 2001 From: Aaron Lindsay Date: Thu, 26 Apr 2018 11:04:38 +0100 Subject: target/arm: Check PMCNTEN for whether PMCCNTR is enabled Signed-off-by: Aaron Lindsay Reviewed-by: Peter Maydell Message-id: 1523997485-1905-2-git-send-email-alindsay@codeaurora.org Signed-off-by: Peter Maydell --- target/arm/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'target') diff --git a/target/arm/helper.c b/target/arm/helper.c index 0fa02c3..1526724 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -994,7 +994,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; } -- cgit v1.1