x86/spec_ctrl: Express Xen's choice of MSR_SPEC_CTRL value as a variable
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 17 Apr 2018 13:15:04 +0000 (14:15 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 22 May 2018 17:41:33 +0000 (18:41 +0100)
commite179546def6a6fea7eb5588d813250d3f5f0ddb2
tree1707aee69101d90768334ca649e8231e8ba76dbd
parent7127ad648e890867ce57d72081b4e113813faa54
x86/spec_ctrl: Express Xen's choice of MSR_SPEC_CTRL value as a variable

At the moment, we have two different encodings of Xen's MSR_SPEC_CTRL value,
which is a side effect of how the Spectre series developed.  One encoding is
via an alias with the bottom bit of bti_ist_info, and can encode IBRS or not,
but not other configurations such as STIBP.

Break Xen's value out into a separate variable (in the top of stack block for
XPTI reasons) and use this instead of bti_ist_info in the IST path.

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>
(cherry picked from commit 66dfae0f32bfbc899c2f3446d5ee57068cb7f957)

Gbp-Pq: Name x86spec_ctrl-express-xens-choice-of-msr_.patch
xen/arch/x86/spec_ctrl.c
xen/arch/x86/x86_64/asm-offsets.c
xen/include/asm-x86/current.h
xen/include/asm-x86/spec_ctrl.h
xen/include/asm-x86/spec_ctrl_asm.h