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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Feb 2022 16:25:40 +0000 (17:25 +0100)
commite92cac1dd803aca5bc326ec22bdcd4f56855d7ce
tree73a563b37d9c683a461f9c117cc8b56664007c02
parent6b55af102b39bf85700ae760080695487df2445a
KVM: x86: Update vCPU's runtime CPUID on write to MSR_IA32_XSS

commit 4c282e51e4450b94680d6ca3b10f830483b1f243 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: 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/x86.c