summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Zyngier <maz@kernel.org>2023-01-05 18:25:43 +0300
committerMarc Zyngier <maz@kernel.org>2023-01-05 18:25:43 +0300
commitd5b4d07bb361fa893244cf55ce5eb053e29b5562 (patch)
treed77df92d44246ba7cdfc0579edf52ec6ded56f95
parentdecb17aeb8fa21484a0140c0696dc5a477cc5c57 (diff)
parentaff234839f8b80ac101e6c2f14d0e44b236efa48 (diff)
downloadlinux-d5b4d07bb361fa893244cf55ce5eb053e29b5562.tar.xz
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 <maz@kernel.org>
-rw-r--r--arch/arm64/kvm/sys_regs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c
index d5ee52d6bf73..c6cbfe6b854b 100644
--- a/arch/arm64/kvm/sys_regs.c
+++ b/arch/arm64/kvm/sys_regs.c
@@ -646,7 +646,7 @@ static void reset_pmcr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *r)
return;
/* Only preserve PMCR_EL0.N, and reset the rest to 0 */
- pmcr = read_sysreg(pmcr_el0) & ARMV8_PMU_PMCR_N_MASK;
+ pmcr = read_sysreg(pmcr_el0) & (ARMV8_PMU_PMCR_N_MASK << ARMV8_PMU_PMCR_N_SHIFT);
if (!kvm_supports_32bit_el0())
pmcr |= ARMV8_PMU_PMCR_LC;