OSDN Git Service

KVM: x86/pmu: Refactoring find_arch_event() to pmc_perf_hw_id()
authorLike Xu <likexu@tencent.com>
Tue, 30 Nov 2021 07:42:17 +0000 (15:42 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 7 Jan 2022 15:44:41 +0000 (10:44 -0500)
commit7c174f305cbee6bdba5018aae02b84369e7ab995
tree47b1d86f97223e25862e6859ebcecc9d77743fba
parent761875634a5e2c3fed36c439fc4acac6f85a96eb
KVM: x86/pmu: Refactoring find_arch_event() to pmc_perf_hw_id()

The find_arch_event() returns a "unsigned int" value,
which is used by the pmc_reprogram_counter() to
program a PERF_TYPE_HARDWARE type perf_event.

The returned value is actually the kernel defined generic
perf_hw_id, let's rename it to pmc_perf_hw_id() with simpler
incoming parameters for better self-explanation.

Signed-off-by: Like Xu <likexu@tencent.com>
Message-Id: <20211130074221.93635-3-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