x86: Introduce alternative indirect thunks
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 18 Dec 2017 13:54:25 +0000 (13:54 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 16 Jan 2018 17:45:50 +0000 (17:45 +0000)
commit858cba0d4c6b6b45180afcb41561fd6585ad51a3
tree2caf65377da89c6f2a654ff86a2f9cf447506072
parentfe3ee5530a8d0d0b6a478167125d00c40f294a86
x86: Introduce alternative indirect thunks

Depending on hardware and microcode availability, we will want to replace
IND_THUNK_REPOLINE with other implementations.

For AMD hardware, choose IND_THUNK_LFENCE in preference to retpoline if lfence
is known to be (or was successfully made) dispatch serialising.

This is part of XSA-254.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
docs/misc/xen-command-line.markdown
xen/arch/x86/indirect-thunk.S
xen/arch/x86/spec_ctrl.c
xen/include/asm-x86/cpufeatures.h