]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
target/arm: Check PMCNTEN for whether PMCCNTR is enabled
authorAaron Lindsay <alindsay@codeaurora.org>
Thu, 26 Apr 2018 10:04:38 +0000 (11:04 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 26 Apr 2018 10:04:38 +0000 (11:04 +0100)
Signed-off-by: Aaron Lindsay <alindsay@codeaurora.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1523997485-1905-2-git-send-email-alindsay@codeaurora.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/helper.c

index 0fa02c31e18face1f019204d899cd9fdbb9bee03..1526724d64eadeea9d411bd96b6d52310e1ea7a7 100644 (file)
@@ -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;
     }