[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v2 3/6] x86/asm: remove HAVE_AS_INVPCID
From: Denis Mukhin <dmukhin@xxxxxxxx> The new toolchain baseline knows the invpcid instruction, no need to carry the workaround in the code. Resolves: https://gitlab.com/xen-project/xen/-/work_items/209 Signed-off-by: Denis Mukhin <dmukhin@xxxxxxxx> --- xen/arch/x86/arch.mk | 1 - xen/arch/x86/include/asm/invpcid.h | 12 +----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/xen/arch/x86/arch.mk b/xen/arch/x86/arch.mk index 6d2876b1a8..dcc8c3c330 100644 --- a/xen/arch/x86/arch.mk +++ b/xen/arch/x86/arch.mk @@ -16,7 +16,6 @@ $(call as-option-add,CFLAGS,CC,"xsaveopt (%rax)",-DHAVE_AS_XSAVEOPT) $(call as-option-add,CFLAGS,CC,"rdseed %eax",-DHAVE_AS_RDSEED) $(call as-option-add,CFLAGS,CC,"clwb (%rax)",-DHAVE_AS_CLWB) $(call as-option-add,CFLAGS,CC,".equ \"x\"$(comma)1",-DHAVE_AS_QUOTED_SYM) -$(call as-option-add,CFLAGS,CC,"invpcid (%rax)$(comma)%rax",-DHAVE_AS_INVPCID) $(call as-option-add,CFLAGS,CC,"movdiri %rax$(comma)(%rax)",-DHAVE_AS_MOVDIR) $(call as-option-add,CFLAGS,CC,"enqcmd (%rax)$(comma)%rax",-DHAVE_AS_ENQCMD) diff --git a/xen/arch/x86/include/asm/invpcid.h b/xen/arch/x86/include/asm/invpcid.h index bf5c30313a..e116a34a6c 100644 --- a/xen/arch/x86/include/asm/invpcid.h +++ b/xen/arch/x86/include/asm/invpcid.h @@ -5,9 +5,6 @@ extern bool use_invpcid; -#define INVPCID_OPCODE ".byte 0x66, 0x0f, 0x38, 0x82\n" -#define MODRM_ECX_01 ".byte 0x01\n" - static inline void invpcid(unsigned int pcid, unsigned long addr, unsigned int type) { @@ -17,16 +14,9 @@ static inline void invpcid(unsigned int pcid, unsigned long addr, uint64_t addr; } desc = { .pcid = pcid, .addr = addr }; - asm volatile ( -#ifdef HAVE_AS_INVPCID - "invpcid %[desc], %q[type]" + asm volatile ( "invpcid %[desc], %q[type]" : /* No output */ : [desc] "m" (desc), [type] "r" (type) -#else - INVPCID_OPCODE MODRM_ECX_01 - : /* No output */ - : "a" (type), "c" (&desc) -#endif : "memory" ); } -- 2.34.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |