KVM: VMX: check CPUID before allowing read/write of IA32_XSS
authorWanpeng Li <wanpengli@tencent.com>
Thu, 20 Jun 2019 09:00:02 +0000 (17:00 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jul 2019 07:13:01 +0000 (09:13 +0200)
commitf4905184931ec1664184f941215d04ebf29315f4
tree329b1cc57266e42769e2b6e9d29b0b0ecf1d61e5
parente64176cd59c2f2915bea66627023f114f66e9e06
KVM: VMX: check CPUID before allowing read/write of IA32_XSS

commit 4d763b168e9c5c366b05812c7bba7662e5ea3669 upstream.

Raise #GP when guest read/write IA32_XSS, but the CPUID bits
say that it shouldn't exist.

Fixes: 203000993de5 (kvm: vmx: add MSR logic for XSAVES)
Reported-by: Xiaoyao Li <xiaoyao.li@linux.intel.com>
Reported-by: Tao Xu <tao3.xu@intel.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/vmx/vmx.c