void (*handle_exit_irqoff)(struct kvm_vcpu *vcpu,
enum exit_fastpath_completion *exit_fastpath);
- bool (*xsaves_supported)(void);
bool (*umip_emulated)(void);
bool (*pt_supported)(void);
goto out;
cpuid_entry_mask(entry, CPUID_D_1_EAX);
-
- if (!kvm_x86_ops->xsaves_supported())
- cpuid_entry_clear(entry, X86_FEATURE_XSAVES);
-
if (entry->eax & (F(XSAVES)|F(XSAVEC)))
entry->ebx = xstate_required_size(supported_xcr0, true);
else
return boot_cpu_has(X86_FEATURE_RDTSCP);
}
-static bool svm_xsaves_supported(void)
-{
- return boot_cpu_has(X86_FEATURE_XSAVES);
-}
-
static bool svm_umip_emulated(void)
{
return false;
.cpuid_update = svm_cpuid_update,
.rdtscp_supported = svm_rdtscp_supported,
- .xsaves_supported = svm_xsaves_supported,
.umip_emulated = svm_umip_emulated,
.pt_supported = svm_pt_supported,
boot_cpu_has(X86_FEATURE_OSPKE))
kvm_cpu_cap_set(X86_FEATURE_PKU);
+ /* CPUID 0xD.1 */
+ if (!vmx_xsaves_supported())
+ kvm_cpu_cap_clear(X86_FEATURE_XSAVES);
+
/* CPUID 0x80000001 */
if (!cpu_has_vmx_rdtscp())
kvm_cpu_cap_clear(X86_FEATURE_RDTSCP);
.check_intercept = vmx_check_intercept,
.handle_exit_irqoff = vmx_handle_exit_irqoff,
- .xsaves_supported = vmx_xsaves_supported,
.umip_emulated = vmx_umip_emulated,
.pt_supported = vmx_pt_supported,