Skip to content

Commit 1aa2abb

Browse files
vittyvkbonzini
authored andcommitted
KVM: x86: Drop guest CPUID check for host initiated writes to MSR_IA32_PERF_CAPABILITIES
The ability to write to MSR_IA32_PERF_CAPABILITIES from the host should not depend on guest visible CPUID entries, even if just to allow creating/restoring guest MSRs and CPUIDs in any sequence. Fixes: 27461da ("KVM: x86/pmu: Support full width counting") Suggested-by: Sean Christopherson <[email protected]> Signed-off-by: Vitaly Kuznetsov <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 10e7a09 commit 1aa2abb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kvm/x86.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3413,7 +3413,7 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
34133413

34143414
if (!msr_info->host_initiated)
34153415
return 1;
3416-
if (guest_cpuid_has(vcpu, X86_FEATURE_PDCM) && kvm_get_msr_feature(&msr_ent))
3416+
if (kvm_get_msr_feature(&msr_ent))
34173417
return 1;
34183418
if (data & ~msr_ent.data)
34193419
return 1;

0 commit comments

Comments
 (0)