KVM: x86/vPMU: Rename pmu_ops callbacks from msr_idx to rdpmc_ecx
authorLike Xu <like.xu@linux.intel.com>
Sun, 27 Oct 2019 10:52:40 +0000 (18:52 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 15 Nov 2019 10:44:08 +0000 (11:44 +0100)
commit98ff80f5b788c1818464022cc61924ef5630d99d
treec86ce065c6a8843e01afc33d08ed190c5e61920e
parent52ba4b0b99770e892f43da1238f437155acb8b58
KVM: x86/vPMU: Rename pmu_ops callbacks from msr_idx to rdpmc_ecx

The leagcy pmu_ops->msr_idx_to_pmc is only called in kvm_pmu_rdpmc, so
this function actually receives the contents of ECX before RDPMC, and
translates it to a kvm_pmc. Let's clarify its semantic by renaming the
existing msr_idx_to_pmc to rdpmc_ecx_to_pmc, and is_valid_msr_idx to
is_valid_rdpmc_ecx; likewise for the wrapper kvm_pmu_is_valid_msr_idx.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Like Xu <like.xu@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/pmu.c
arch/x86/kvm/pmu.h
arch/x86/kvm/pmu_amd.c
arch/x86/kvm/vmx/pmu_intel.c
arch/x86/kvm/x86.c