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 <seanjc@google.com> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Message-Id: <20211216165213.338923-3-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 10e7a09 commit 1aa2abb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)