diff -r b1ace8d2143c -r 325392ae335f xen/include/asm-x86/cpufeature.h --- a/xen/include/asm-x86/cpufeature.h +++ b/xen/include/asm-x86/cpufeature.h @@ -201,6 +201,8 @@ #define cpu_has_svm boot_cpu_has(X86_FEATURE_SVME) +#define cpu_has_vmx boot_cpu_has(X86_FEATURE_VMXE) + #endif /* __ASM_I386_CPUFEATURE_H */ /* diff -r b1ace8d2143c -r 325392ae335f xen/include/asm-x86/hvm/hvm.h --- a/xen/include/asm-x86/hvm/hvm.h +++ b/xen/include/asm-x86/hvm/hvm.h @@ -315,7 +315,8 @@ static inline int hvm_do_pmu_interrupt(s X86_CR4_DE | X86_CR4_PSE | X86_CR4_PAE | \ X86_CR4_MCE | X86_CR4_PGE | X86_CR4_PCE | \ X86_CR4_OSFXSR | X86_CR4_OSXMMEXCPT | \ - (cpu_has_xsave ? X86_CR4_OSXSAVE : 0)))) + (cpu_has_xsave ? X86_CR4_OSXSAVE : 0) | \ + (cpu_has_vmx ? X86_CR4_VMXE : 0)))) /* These exceptions must always be intercepted. */ #define HVM_TRAP_MASK ((1U << TRAP_machine_check) | (1U << TRAP_invalid_op))