x86/boot: Calculate the most appropriate BTI mitigation to use
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 19 Dec 2017 13:59:21 +0000 (13:59 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 26 Jan 2018 14:10:21 +0000 (14:10 +0000)
commit2713715305ca516f698d58cec5e0b322c3b2c4eb
treed3770475d4171f47366d3557af3e800e34a44179
parent3fffaf9c13e9502f09ad4ab1aac3f8b7b9398f6f
x86/boot: Calculate the most appropriate BTI mitigation to use

See the logic and comments in init_speculation_mitigations() for further
details.

There are two controls for RSB overwriting, because in principle there are
cases where it might be safe to forego rsb_native (Off the top of my head,
SMEP active, no 32bit PV guests at all, no use of vmevent/paging subsystems
for HVM guests, but I make no guarantees that this list of restrictions is
exhaustive).

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/spec_ctrl.c
xen/include/asm-x86/spec_ctrl.h