[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] x86/asm: Remove HAVE_AS_INVPCID
commit 5d40380ee9d647874b3e49c0d263eeeb3bb7851e Author: Denis Mukhin <dmukhin@xxxxxxxx> AuthorDate: Thu Apr 3 18:23:13 2025 +0000 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Thu Apr 3 21:29:34 2025 +0100 x86/asm: Remove HAVE_AS_INVPCID The new toolchain baseline knows the INVPCID instruction; no need to carry the workaround in the code. No functional change. Resolves: https://gitlab.com/xen-project/xen/-/work_items/209 Signed-off-by: Denis Mukhin <dmukhin@xxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- xen/arch/x86/arch.mk | 1 - xen/arch/x86/include/asm/invpcid.h | 18 ++++-------------- 2 files changed, 4 insertions(+), 15 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..204052f1b4 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,17 +14,10 @@ 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]" - : /* No output */ - : [desc] "m" (desc), [type] "r" (type) -#else - INVPCID_OPCODE MODRM_ECX_01 - : /* No output */ - : "a" (type), "c" (&desc) -#endif - : "memory" ); + asm volatile ( "invpcid %[desc], %q[type]" + : + : [desc] "m" (desc), [type] "r" (type) + : "memory" ); } /* Flush all mappings for a given PCID and addr, not including globals */ -- generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |