mbox series

[0/2] KVM: arm64: vPMU fixes for NV/EL2

Message ID 20231011081649.3226792-1-oliver.upton@linux.dev (mailing list archive)
Headers show
Series KVM: arm64: vPMU fixes for NV/EL2 | expand

Message

Oliver Upton Oct. 11, 2023, 8:16 a.m. UTC
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@arm.com/

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(-)