[PATCH 0/4] KVM: x86/pmu: Clean up arch/hw event handling

From: Sean Christopherson
Date: Tue Jun 06 2023 - 21:02:19 EST


Clean up KVM's handling of arch/hw events, and the related fixed counter
usage. KVM has far too many open coded magic numbers, and kludgy code
that stems from the magic numbers.

Sean Christopherson (4):
KVM: x86/pmu: Use enums instead of hardcoded magic for arch event
indices
KVM: x86/pmu: Simplify intel_hw_event_available()
KVM: x86/pmu: Require nr fixed_pmc_events to match nr max fixed
counters
KVM: x86/pmu: Move .hw_event_available() check out of PMC filter
helper

arch/x86/kvm/pmu.c | 4 +-
arch/x86/kvm/vmx/pmu_intel.c | 81 ++++++++++++++++++++++++------------
2 files changed, 56 insertions(+), 29 deletions(-)


base-commit: 31b4fc3bc64aadd660c5bfa5178c86a7ba61e0f7
--
2.41.0.162.gfafddb0af9-goog