Skip to content

Commit d5b4d07

Browse files
author
Marc Zyngier
committed
Merge branch kvm-arm64/pmu-fixes-6.2 into kvmarm-master/fixes
* kvm-arm64/pmu-fixes-6.2: : . : Fix for an incredibly stupid bug in the PMU rework that went into : 6.2. Brown paper bag time. : . KVM: arm64: PMU: Fix PMCR_EL0 reset value Signed-off-by: Marc Zyngier <[email protected]>
2 parents decb17a + aff2348 commit d5b4d07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/kvm/sys_regs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ static void reset_pmcr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *r)
646646
return;
647647

648648
/* Only preserve PMCR_EL0.N, and reset the rest to 0 */
649-
pmcr = read_sysreg(pmcr_el0) & ARMV8_PMU_PMCR_N_MASK;
649+
pmcr = read_sysreg(pmcr_el0) & (ARMV8_PMU_PMCR_N_MASK << ARMV8_PMU_PMCR_N_SHIFT);
650650
if (!kvm_supports_32bit_el0())
651651
pmcr |= ARMV8_PMU_PMCR_LC;
652652

0 commit comments

Comments
 (0)