OSDN Git Service

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)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 20 Jun 2019 12:21:51 +0000 (14:21 +0200)
commit4d763b168e9c5c366b05812c7bba7662e5ea3669
treef85cc0aa39b70123934cdc59b95b55ff4cb71e30
parenteceb9973d908cb327372bf0d04f2d1ee0b27bff5
KVM: VMX: check CPUID before allowing read/write of IA32_XSS

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>
arch/x86/kvm/vmx/vmx.c