KVM: x86: Update vCPU's runtime CPUID on write to MSR_IA32_XSS
authorLike Xu <likexu@tencent.com>
Wed, 26 Jan 2022 17:22:25 +0000 (17:22 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 26 Jan 2022 17:42:45 +0000 (12:42 -0500)
commit4c282e51e4450b94680d6ca3b10f830483b1f243
tree727f3d98d1dda122a4af6ee5477ec76df81d83e9
parentbe4f3b3f82271c3193ce200a996dc70682c8e622
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>
arch/x86/kvm/x86.c