summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorLike Xu <likexu@tencent.com>2022-01-26 20:22:25 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2022-01-26 20:42:45 +0300
commit4c282e51e4450b94680d6ca3b10f830483b1f243 (patch)
tree727f3d98d1dda122a4af6ee5477ec76df81d83e9 /arch
parentbe4f3b3f82271c3193ce200a996dc70682c8e622 (diff)
downloadlinux-4c282e51e4450b94680d6ca3b10f830483b1f243.tar.xz
KVM: x86: Update vCPU's runtime CPUID on write to MSR_IA32_XSS
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: 203000993de5 ("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>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kvm/x86.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index b6d60c296eda..9c984eeed30c 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -3535,6 +3535,7 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
if (data & ~supported_xss)
return 1;
vcpu->arch.ia32_xss = data;
+ kvm_update_cpuid_runtime(vcpu);
break;
case MSR_SMI_COUNT:
if (!msr_info->host_initiated)