]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
xen/x86: Drop sync_core()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 19 May 2017 10:01:42 +0000 (11:01 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 31 May 2017 16:54:19 +0000 (17:54 +0100)
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 <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/include/asm-x86/processor.h

index 1d1a4ff2da6e7c7a8aff602e46729f1cb0ca22ac..6a335d3a61000a2da62577c453df9eef42e5d510 100644 (file)
@@ -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)
 {