]> git.baikalelectronics.ru Git - kernel.git/commit
kvm: vmx: Raise #UD on unsupported XSAVES/XRSTORS
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 24 Aug 2017 12:48:03 +0000 (14:48 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 24 Aug 2017 16:09:13 +0000 (18:09 +0200)
commit674d7ee96085c02d3b32da59bc5c51bbb4405b8e
treee9cb104b81f6b3f3c9d2a1a22e3151bf7f133264
parentb1b280c8c1e1b5ae71ac660abdcf735d7b703c03
kvm: vmx: Raise #UD on unsupported XSAVES/XRSTORS

A guest may not be configured to support XSAVES/XRSTORS, even when the host
does. If the guest does not support XSAVES/XRSTORS, clear the secondary
execution control so that the processor will raise #UD.

Also clear the "allowed-1" bit for XSAVES/XRSTORS exiting in the
IA32_VMX_PROCBASED_CTLS2 MSR, and pass through VMCS12's control in
the VMCS02.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx.c