]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/pmu: Drop amd_event_mapping[] in the KVM context
authorLike Xu <likexu@tencent.com>
Wed, 18 May 2022 13:25:12 +0000 (21:25 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 8 Jun 2022 08:49:06 +0000 (04:49 -0400)
commit308944897fd0e92181bc5cd969d79ab727670cec
treeb94ef4ed14187483b2f90711fb980d35adf8896f
parentd35b998069214b11e94330196a43b0ccb14eba0a
KVM: x86/pmu: Drop amd_event_mapping[] in the KVM context

All gp or fixed counters have been reprogrammed using PERF_TYPE_RAW,
which means that the table that maps perf_hw_id to event select values is
no longer useful, at least for AMD.

For Intel, the logic to check if the pmu event reported by Intel cpuid is
not available is still required, in which case pmc_perf_hw_id() could be
renamed to hw_event_is_unavail() and a bool value is returned to replace
the semantics of "PERF_COUNT_HW_MAX+1".

Signed-off-by: Like Xu <likexu@tencent.com>
Message-Id: <20220518132512.37864-12-likexu@tencent.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm-x86-pmu-ops.h
arch/x86/kvm/pmu.c
arch/x86/kvm/pmu.h
arch/x86/kvm/svm/pmu.c
arch/x86/kvm/vmx/pmu_intel.c