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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Feb 2022 11:03:16 +0000 (12:03 +0100)
commitd8110cb2cf19f8056fd82fc68bdf92ad33969568
tree5ac1ee5364a48dee7174dca0df5bcacbcb07d895
parentc377e2ba78d3fe9a1f0b4ec424e75f81da7e81e9
KVM: x86/pmu: Refactoring find_arch_event() to pmc_perf_hw_id()

[ Upstream commit 7c174f305cbee6bdba5018aae02b84369e7ab995 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/kvm/pmu.c
arch/x86/kvm/pmu.h
arch/x86/kvm/svm/pmu.c
arch/x86/kvm/vmx/pmu_intel.c