Sean Christopherson 1647b52757 KVM: x86/pmu: Reset the PMU, i.e. stop counters, before refreshing
Stop all counters and release all perf events before refreshing the vPMU,
i.e. before reconfiguring the vPMU to respond to changes in the vCPU
model.

Clear need_cleanup in kvm_pmu_reset() as well so that KVM doesn't
prematurely stop counters, e.g. if KVM enters the guest and enables
counters before the vCPU is scheduled out.

Cc: stable@vger.kernel.org
Reviewed-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Link: https://lore.kernel.org/r/20231103230541.352265-3-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
2023-11-30 12:52:54 -08:00
..
2023-11-03 15:44:25 -10:00
2023-11-10 16:35:04 -08:00
2023-11-04 08:07:19 -10:00
2023-11-03 15:44:25 -10:00
2023-11-01 15:28:33 -10:00
2023-09-05 10:09:31 -07:00
2023-11-03 15:44:25 -10:00