]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/pmu: Reuse pmc_perf_hw_id() and drop find_fixed_event()
authorLike Xu <likexu@tencent.com>
Tue, 30 Nov 2021 07:42:18 +0000 (15:42 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 7 Jan 2022 15:44:42 +0000 (10:44 -0500)
commit9172bd703a170f419f1761e1c0c982558eb58351
tree8252add2eb57b52fa72f8a7ccabec5ee9e9f6741
parent1bdb5f34f650a1035422f15cf3a57279c747d2ad
KVM: x86/pmu: Reuse pmc_perf_hw_id() and drop find_fixed_event()

Since we set the same semantic event value for the fixed counter in
pmc->eventsel, returning the perf_hw_id for the fixed counter via
find_fixed_event() can be painlessly replaced by pmc_perf_hw_id()
with the help of pmc_is_fixed() check.

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