x86/spec_ctrl: Fold the XEN_IBRS_{SET,CLEAR} ALTERNATIVES together
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 17 Apr 2018 13:15:04 +0000 (14:15 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 16 May 2018 11:19:10 +0000 (12:19 +0100)
commitaf949407eaba7af71067f23d5866cd0bf1f1144d
treec4c42db9846dc27f3f10547b40b3151ef63c79ba
parent5262ba2e7799001402dfe139ff944e035dfff928
x86/spec_ctrl: Fold the XEN_IBRS_{SET,CLEAR} ALTERNATIVES together

Currently, the SPEC_CTRL_{ENTRY,EXIT}_* macros encode Xen's choice of
MSR_SPEC_CTRL as an immediate constant, and chooses between IBRS or not by
doubling up the entire alternative block.

There is now a variable holding Xen's choice of value, so use that and
simplify the alternatives.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
xen/arch/x86/spec_ctrl.c
xen/include/asm-x86/cpufeatures.h
xen/include/asm-x86/spec_ctrl.h
xen/include/asm-x86/spec_ctrl_asm.h