KVM: x86/pmu: Move PMU reset logic to common x86 code
[linux-block.git] / arch / x86 / kvm / vmx / pmu_intel.c
index 820d3e1f6b4f825fc653e745a4bb839ca2f57416..90c1f7f07e53b07f0c6d9cb92e8f00a6913032c8 100644 (file)
@@ -632,26 +632,6 @@ static void intel_pmu_init(struct kvm_vcpu *vcpu)
 
 static void intel_pmu_reset(struct kvm_vcpu *vcpu)
 {
-       struct kvm_pmu *pmu = vcpu_to_pmu(vcpu);
-       struct kvm_pmc *pmc = NULL;
-       int i;
-
-       for (i = 0; i < KVM_INTEL_PMC_MAX_GENERIC; i++) {
-               pmc = &pmu->gp_counters[i];
-
-               pmc_stop_counter(pmc);
-               pmc->counter = pmc->prev_counter = pmc->eventsel = 0;
-       }
-
-       for (i = 0; i < KVM_PMC_MAX_FIXED; i++) {
-               pmc = &pmu->fixed_counters[i];
-
-               pmc_stop_counter(pmc);
-               pmc->counter = pmc->prev_counter = 0;
-       }
-
-       pmu->fixed_ctr_ctrl = pmu->global_ctrl = pmu->global_status = 0;
-
        intel_pmu_release_guest_lbr_event(vcpu);
 }