KVM: arm64: PMU: Allow ID_DFR0_EL1.PerfMon to be set from userspace
authorMarc Zyngier <maz@kernel.org>
Sun, 13 Nov 2022 16:38:28 +0000 (16:38 +0000)
committerMarc Zyngier <maz@kernel.org>
Sat, 19 Nov 2022 12:56:39 +0000 (12:56 +0000)
commitd82e0dfdfda73f91e7282e1083a2cd7cd366ea87
treedac765df304cea1a8a2645e96159130f5d106b74
parent60e651ff1f48bfdf8fec80d35510bd89ecf8c766
KVM: arm64: PMU: Allow ID_DFR0_EL1.PerfMon to be set from userspace

Allow userspace to write ID_DFR0_EL1, on the condition that only
the PerfMon field can be altered and be something that is compatible
with what was computed for the AArch64 view of the guest.

Reviewed-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20221113163832.3154370-13-maz@kernel.org
arch/arm64/kvm/sys_regs.c