KVM: arm64: PMU: Simplify PMCR_EL0 reset handling
authorMarc Zyngier <maz@kernel.org>
Thu, 24 Nov 2022 10:40:02 +0000 (10:40 +0000)
committerMarc Zyngier <maz@kernel.org>
Mon, 28 Nov 2022 14:04:08 +0000 (14:04 +0000)
commit292e8f1494764ac46dd1b7dd46fa317db691436c
treecebfe724432816d5fbfac1a2b332451bc1860fd3
parent86815735aa571d493cf5768cad5fa8e6fd9c7ba8
KVM: arm64: PMU: Simplify PMCR_EL0 reset handling

Resetting PMCR_EL0 is a pretty involved process that includes
poisoning some of the writable bits, just because we can.

It makes it hard to reason about about what gets configured,
and just resetting things to 0 seems like a much saner option.

Reduce reset_pmcr() to just preserving PMCR_EL0.N from the host,
and setting PMCR_EL0.LC if we don't support AArch32.

Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/sys_regs.c