From: Denis Mukhin <dmuk...@ford.com> Remove the workaround under HAVE_AS_EPT for older compilers, as the minimally required GCC 5.1 / Binutils 2.25, and Clang 11 natively support the VMX instructions used in the hypervisor code.
Signed-off-by: Denis Mukhin <dmuk...@ford.com> --- xen/arch/x86/arch.mk | 1 - xen/arch/x86/include/asm/hvm/vmx/vmx.h | 16 ---------------- 2 files changed, 17 deletions(-) diff --git a/xen/arch/x86/arch.mk b/xen/arch/x86/arch.mk index 6e23d3c27c..42c3aa73da 100644 --- a/xen/arch/x86/arch.mk +++ b/xen/arch/x86/arch.mk @@ -11,7 +11,6 @@ CFLAGS += -msoft-float $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) $(call cc-option-add,CFLAGS,CC,-Wnested-externs) $(call as-option-add,CFLAGS,CC,"crc32 %eax$(comma)%eax",-DHAVE_AS_SSE4_2) -$(call as-option-add,CFLAGS,CC,"invept (%rax)$(comma)%rax",-DHAVE_AS_EPT) $(call as-option-add,CFLAGS,CC,"rdrand %eax",-DHAVE_AS_RDRAND) $(call as-option-add,CFLAGS,CC,"rdfsbase %rax",-DHAVE_AS_FSGSBASE) $(call as-option-add,CFLAGS,CC,"xsaveopt (%rax)",-DHAVE_AS_XSAVEOPT) diff --git a/xen/arch/x86/include/asm/hvm/vmx/vmx.h b/xen/arch/x86/include/asm/hvm/vmx/vmx.h index cfa04aa5a4..ce3c067a88 100644 --- a/xen/arch/x86/include/asm/hvm/vmx/vmx.h +++ b/xen/arch/x86/include/asm/hvm/vmx/vmx.h @@ -429,21 +429,13 @@ static always_inline void __invept(unsigned long type, uint64_t eptp) type = INVEPT_ALL_CONTEXT; asm volatile ( -#ifdef HAVE_AS_EPT "invept %0, %1\n" -#else - INVEPT_OPCODE MODRM_EAX_08 -#endif /* CF==1 or ZF==1 --> BUG() */ UNLIKELY_START(be, invept) _ASM_BUGFRAME_TEXT(0) UNLIKELY_END_SECTION : -#ifdef HAVE_AS_EPT : "m" (operand), "r" (type), -#else - : "a" (&operand), "c" (type), -#endif _ASM_BUGFRAME_INFO(BUGFRAME_bug, __LINE__, __FILE__, 0) : "memory" ); } @@ -458,11 +450,7 @@ static always_inline void __invvpid(unsigned long type, u16 vpid, u64 gva) /* Fix up #UD exceptions which occur when TLBs are flushed before VMXON. */ asm volatile ( "1: " -#ifdef HAVE_AS_EPT "invvpid %0, %1\n" -#else - INVVPID_OPCODE MODRM_EAX_08 -#endif /* CF==1 or ZF==1 --> BUG() */ UNLIKELY_START(be, invvpid) _ASM_BUGFRAME_TEXT(0) @@ -470,11 +458,7 @@ static always_inline void __invvpid(unsigned long type, u16 vpid, u64 gva) "2:" _ASM_EXTABLE(1b, 2b) : -#ifdef HAVE_AS_EPT : "m" (operand), "r" (type), -#else - : "a" (&operand), "c" (type), -#endif _ASM_BUGFRAME_INFO(BUGFRAME_bug, __LINE__, __FILE__, 0) : "memory" ); } -- 2.34.1