]> Gentwo Git Trees - linux/.git/commit
KVM: x86/pmu: Move initialization of valid PMCs bitmask to common x86
authorSean Christopherson <seanjc@google.com>
Wed, 6 Aug 2025 19:56:52 +0000 (12:56 -0700)
committerSean Christopherson <seanjc@google.com>
Thu, 18 Sep 2025 19:58:13 +0000 (12:58 -0700)
commit9bae7a086394128bd829c0c04f9f75600fdc1bc1
treef5451164495599e2026f521d10f3a87e81599e50
parent30c0267f15812114d7ab96a7dd45874742d736fe
KVM: x86/pmu: Move initialization of valid PMCs bitmask to common x86

Move all initialization of all_valid_pmc_idx to common code, as the logic
is 100% common to Intel and AMD, and KVM heavily relies on Intel and AMD
having the same semantics.  E.g. the fact that AMD doesn't support fixed
counters doesn't allow KVM to use all_valid_pmc_idx[63:32] for other
purposes.

Tested-by: Xudong Hao <xudong.hao@intel.com>
Link: https://lore.kernel.org/r/20250806195706.1650976-31-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/pmu.c
arch/x86/kvm/svm/pmu.c
arch/x86/kvm/vmx/pmu_intel.c