xen/x86: Introduce static inline wrappers for l{idt,gdt,ldt,tr}()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 2 Oct 2017 13:58:17 +0000 (13:58 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 1 Dec 2017 19:03:26 +0000 (19:03 +0000)
commit1a8210c52a50ea518605f244fe235afbd6078122
treec57d667d6ae712e654b9e262b2bb9db416fbb1c7
parentc1a7e259f07f59ef8977399dfba96b5c83963c47
xen/x86: Introduce static inline wrappers for l{idt,gdt,ldt,tr}()

This avoids indirection and parameter constraint issues.  Doing so relaxes the
load_LDT() constraints from %ax to any general purpose register.  The helpers
are upgraded to full compiler barriers, because nothing good will come of
having these reordered with respect to other segment accesses.

The triple-fault reboot method stays as is, to avoid the int3 possibly getting
moved relative to the lidt.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/cpu/common.c
xen/arch/x86/domain.c
xen/common/efi/runtime.c
xen/include/asm-x86/desc.h
xen/include/asm-x86/ldt.h