KVM: x86/pmu: preserve IA32_PERF_CAPABILITIES across CPUID refresh
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 2 Feb 2021 14:32:35 +0000 (09:32 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 4 Feb 2021 10:27:23 +0000 (05:27 -0500)
commita755753903a40d982f6dd23d65eb96b248a2577a
tree35571636f6b7d78f61a6a438983b86f1caede7f8
parent252e365eb28ddf49eb31cec1a5d99e708c73f57b
KVM: x86/pmu: preserve IA32_PERF_CAPABILITIES across CPUID refresh

Once MSR_IA32_PERF_CAPABILITIES is changed via vmx_set_msr(), the
value should not be changed by cpuid(). To ensure that the new value
is kept, the default initialization path is moved to intel_pmu_init().
The effective value of the MSR will be 0 if PDCM is clear, however.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/pmu_intel.c