KVM allows userspace to select both the vPMU and NV feature flags, which is an absolute no-go since we do not handle any of the EL2 controls. Furthermore, our sysreg emulation allows the guest to set the NSH bit responsible for counting events at EL2 despite the fact it does absolutely nothing. Series to address the both of these issues. While neither of them are really a big deal at the moment, the second patch is relevant to James C's PMU event threshold series [*]. [*] https://lore.kernel.org/kvmarm/20231010141551.2262059-1-james.clark@xxxxxxx/ Oliver Upton (2): KVM: arm64: Disallow vPMU for NV guests KVM: arm64: Treat PMEVTYPER<n>_EL0.NSH as RES0 arch/arm64/kvm/arm.c | 5 +++-- arch/arm64/kvm/pmu-emul.c | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) -- 2.42.0.609.gbb76f46606-goog