KVM: x86/pmu: Use enums instead of hardcoded magic for arch event indices
authorSean Christopherson <seanjc@google.com>
Wed, 7 Jun 2023 01:02:03 +0000 (18:02 -0700)
committerSean Christopherson <seanjc@google.com>
Wed, 2 Aug 2023 23:44:36 +0000 (16:44 -0700)
commit0033fa35491680bce65ff78fb41445f472aa5baa
treea4ceb5db409ccef617ddf1c592266c9a5e8fe377
parentfdf0eaf11452d72945af31804e2a1048ee1b574c
KVM: x86/pmu: Use enums instead of hardcoded magic for arch event indices

Add "enum intel_pmu_architectural_events" to replace the magic numbers for
the (pseudo-)architectural events, and to give a meaningful name to each
event so that new readers don't need psychic powers to understand what the
code is doing.

Cc: Aaron Lewis <aaronlewis@google.com>
Cc: Like Xu <like.xu.linux@gmail.com>
Reviewed-by: Like Xu <likexu@tencent.com>
Link: https://lore.kernel.org/r/20230607010206.1425277-2-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/vmx/pmu_intel.c