target/arm: Check PMCNTEN for whether PMCCNTR is enabled

Backports commit ccbc0e338486b21cb0eb52e52cd309bbbe6a7507 from qemu
This commit is contained in:
Aaron Lindsay 2018-04-26 09:06:56 -04:00 committed by Lioncash
parent 43e7478d3f
commit e1bffbf7df
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -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;
}