summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx
diff options
context:
space:
mode:
authorLike Xu <likexu@tencent.com>2023-06-02 18:10:48 -0700
committerSean Christopherson <seanjc@google.com>2023-06-06 17:31:44 -0700
commit8de18543dfe34a6aac9deefb0256db2609cfa351 (patch)
tree02632905e07bf6bbdde4f3d4fcce7b6529d6bec8 /arch/x86/kvm/vmx
parent53550b89220beda42934a76a61313ecf308b2b03 (diff)
downloadlinux-stable-8de18543dfe34a6aac9deefb0256db2609cfa351.tar.gz
linux-stable-8de18543dfe34a6aac9deefb0256db2609cfa351.tar.bz2
linux-stable-8de18543dfe34a6aac9deefb0256db2609cfa351.zip
KVM: x86/pmu: Move reprogram_counters() to pmu.h
Move reprogram_counters() out of Intel specific PMU code and into pmu.h so that it can be used to implement AMD PMU v2 support. No functional change intended. Suggested-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Like Xu <likexu@tencent.com> [sean: rewrite changelog] Link: https://lore.kernel.org/r/20230603011058.1038821-3-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'arch/x86/kvm/vmx')
-rw-r--r--arch/x86/kvm/vmx/pmu_intel.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/arch/x86/kvm/vmx/pmu_intel.c b/arch/x86/kvm/vmx/pmu_intel.c
index fb96cbfc9ae8..edcf8670eb4e 100644
--- a/arch/x86/kvm/vmx/pmu_intel.c
+++ b/arch/x86/kvm/vmx/pmu_intel.c
@@ -73,18 +73,6 @@ static struct kvm_pmc *intel_pmc_idx_to_pmc(struct kvm_pmu *pmu, int pmc_idx)
}
}
-static void reprogram_counters(struct kvm_pmu *pmu, u64 diff)
-{
- int bit;
-
- if (!diff)
- return;
-
- for_each_set_bit(bit, (unsigned long *)&diff, X86_PMC_IDX_MAX)
- set_bit(bit, pmu->reprogram_pmi);
- kvm_make_request(KVM_REQ_PMU, pmu_to_vcpu(pmu));
-}
-
static bool intel_hw_event_available(struct kvm_pmc *pmc)
{
struct kvm_pmu *pmu = pmc_to_pmu(pmc);