kvm: x86: Add kvm_x86_ops hook that enables XSAVES for guest
Expose the XSAVES feature to the guest if the kvm_x86_ops say it is available. Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Este commit está contenido en:
@@ -7553,6 +7553,12 @@ static bool vmx_mpx_supported(void)
|
||||
(vmcs_config.vmentry_ctrl & VM_ENTRY_LOAD_BNDCFGS);
|
||||
}
|
||||
|
||||
static bool vmx_xsaves_supported(void)
|
||||
{
|
||||
return vmcs_config.cpu_based_2nd_exec_ctrl &
|
||||
SECONDARY_EXEC_XSAVES;
|
||||
}
|
||||
|
||||
static void vmx_recover_nmi_blocking(struct vcpu_vmx *vmx)
|
||||
{
|
||||
u32 exit_intr_info;
|
||||
@@ -9329,6 +9335,7 @@ static struct kvm_x86_ops vmx_x86_ops = {
|
||||
.check_intercept = vmx_check_intercept,
|
||||
.handle_external_intr = vmx_handle_external_intr,
|
||||
.mpx_supported = vmx_mpx_supported,
|
||||
.xsaves_supported = vmx_xsaves_supported,
|
||||
|
||||
.check_nested_events = vmx_check_nested_events,
|
||||
|
||||
|
Referencia en una nueva incidencia
Block a user