From: Andrew Cooper Date: Fri, 19 May 2017 10:01:42 +0000 (+0100) Subject: xen/x86: Drop sync_core() X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~2103 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7c96d4e6b1452af3c8a11a09cab9c7f488b73733;p=xen.git xen/x86: Drop sync_core() As identified in Linux c/s c198b121b1a1d "x86/asm: Rewrite sync_core() to use IRET-to-self", sync_core() is only appropriate for two very specific usecases. Xen doesn't have need of either of these usecases, so drop sync_core() to avoid any misuse. In the unlikely event that we do gain a legitimate use for sync_core(), it should be reintroduced as a mov to %cr2 rather than cpuid, which has a lower overhead. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- diff --git a/xen/include/asm-x86/processor.h b/xen/include/asm-x86/processor.h index 1d1a4ff2da..6a335d3a61 100644 --- a/xen/include/asm-x86/processor.h +++ b/xen/include/asm-x86/processor.h @@ -396,17 +396,6 @@ static inline bool_t read_pkru_wd(uint32_t pkru, unsigned int pkey) outb((data), 0x23); \ } while (0) -/* Stop speculative execution */ -static inline void sync_core(void) -{ - int tmp; - asm volatile ( - "cpuid" - : "=a" (tmp) - : "0" (1) - : "ebx","ecx","edx","memory" ); -} - static always_inline void __monitor(const void *eax, unsigned long ecx, unsigned long edx) {