KVM: x86/pmu: Remove KVM's enumeration of Intel's architectural encodings
authorSean Christopherson <seanjc@google.com>
Tue, 9 Jan 2024 23:02:23 +0000 (15:02 -0800)
committerSean Christopherson <seanjc@google.com>
Tue, 30 Jan 2024 23:28:02 +0000 (15:28 -0800)
commitdb9e008a0f37bd31ac3d77d650812612b7c873da
tree5d682a2452dd092f82075e208c9dd3132b77aa34
parentcbbd1aa891398e9ddbdd05bc4e40a988175f22af
KVM: x86/pmu: Remove KVM's enumeration of Intel's architectural encodings

Drop KVM's enumeration of Intel's architectural event encodings, and
instead open code the three encodings (of which only two are real) that
KVM uses to emulate fixed counters.  Now that KVM doesn't incorrectly
enforce the availability of architectural encodings, there is no reason
for KVM to ever care about the encodings themselves, at least not in the
current format of an array indexed by the encoding's position in CPUID.

Opportunistically add a comment to explain why KVM cares about eventsel
values for fixed counters.

Suggested-by: Jim Mattson <jmattson@google.com>
Tested-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Link: https://lore.kernel.org/r/20240109230250.424295-4-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/vmx/pmu_intel.c