]> www.infradead.org Git - nvme.git/commit
KVM: x86/pmu: Introduce distinct macros for GP/fixed counter max number
authorDapeng Mi <dapeng1.mi@linux.intel.com>
Thu, 27 Jun 2024 02:17:55 +0000 (10:17 +0800)
committerSean Christopherson <seanjc@google.com>
Fri, 28 Jun 2024 16:12:16 +0000 (09:12 -0700)
commitf287bef6ddc208cae49c8d3833aeecda47872608
tree1b94f517b55249ae64b64b7866277afc23f77697
parent3b65a692a5c78d597d23a2838e91d7bf8ef49291
KVM: x86/pmu: Introduce distinct macros for GP/fixed counter max number

Refine the macros which define maximum General Purpose (GP) and fixed
counter numbers.

Currently the macro KVM_INTEL_PMC_MAX_GENERIC is used to represent the
maximum supported General Purpose (GP) counter number ambiguously across
Intel and AMD platforms. This would cause issues if AMD begins to support
more GP counters than Intel.

Thus a bunch of new macros including vendor specific and vendor
independent are introduced to replace the old macros. The vendor
independent macros are used in x86 common code to hide vendor difference
and eliminate the ambiguity.

No logic changes are introduced in this patch.

Signed-off-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Link: https://lore.kernel.org/r/20240627021756.144815-1-dapeng1.mi@linux.intel.com
Co-developed-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/pmu.c
arch/x86/kvm/pmu.h
arch/x86/kvm/svm/pmu.c
arch/x86/kvm/vmx/pmu_intel.c
arch/x86/kvm/x86.c