Revert "Revert "KVM: arm64: PMU: Don't save PMCR_EL0.{C,P} for the vCPU""

This reverts commit 067f7ca9fd.

It was perserving the ABI, but that is not needed anymore at this point
in time.

Change-Id: Ie5c4e8b82bac1966ea56834f02ddcc83dccbd7d1
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman
2023-04-26 12:15:30 +00:00
committed by Carlos Llamas
parent 8e52c029c9
commit 0d9ea5d875

View File

@@ -511,7 +511,8 @@ void kvm_pmu_handle_pmcr(struct kvm_vcpu *vcpu, u64 val)
if (!kvm_vcpu_has_pmu(vcpu))
return;
__vcpu_sys_reg(vcpu, PMCR_EL0) = val;
/* The reset bits don't indicate any state, and shouldn't be saved. */
__vcpu_sys_reg(vcpu, PMCR_EL0) = val & ~(ARMV8_PMU_PMCR_C | ARMV8_PMU_PMCR_P);
if (val & ARMV8_PMU_PMCR_E) {
kvm_pmu_enable_counter_mask(vcpu,