Skip to content

Commit e92cac1

Browse files
lkml-likexugregkh
authored andcommitted
KVM: x86: Update vCPU's runtime CPUID on write to MSR_IA32_XSS
commit 4c282e5 upstream. Do a runtime CPUID update for a vCPU if MSR_IA32_XSS is written, as the size in bytes of the XSAVE area is affected by the states enabled in XSS. Fixes: 2030009 ("kvm: vmx: add MSR logic for XSAVES") Cc: stable@vger.kernel.org Signed-off-by: Like Xu <likexu@tencent.com> [sean: split out as a separate patch, adjust Fixes tag] Signed-off-by: Sean Christopherson <seanjc@google.com> Message-Id: <20220126172226.2298529-3-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 6b55af1 commit e92cac1

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎arch/x86/kvm/x86.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3171,6 +3171,7 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
31713171
if (data & ~supported_xss)
31723172
return 1;
31733173
vcpu->arch.ia32_xss = data;
3174+
kvm_update_cpuid_runtime(vcpu);
31743175
break;
31753176
case MSR_SMI_COUNT:
31763177
if (!msr_info->host_initiated)

0 commit comments

Comments
 (0)