OSDN Git Service

KVM: x86/pmu: Pass only "struct kvm_pmc *pmc" to reprogram_counter()
authorLike Xu <likexu@tencent.com>
Wed, 18 May 2022 13:25:05 +0000 (21:25 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 8 Jun 2022 08:48:48 +0000 (04:48 -0400)
commita40239b4cf33b2de872b04759c3e5ab87cc72a7f
tree8893ff71a6ce8b5f9d4bc3660df069c44a264f85
parent89cb454ea984d0411523dc10e70e9bf0aca1b527
KVM: x86/pmu: Pass only "struct kvm_pmc *pmc" to reprogram_counter()

Passing the reference "struct kvm_pmc *pmc" when creating
pmc->perf_event is sufficient. This change helps to simplify the
calling convention by replacing reprogram_{gp, fixed}_counter()
with reprogram_counter() seamlessly.

No functional change intended.

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