x86/spec-ctrl: Infrastructure to use VERW to flush pipeline buffers
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 12 Dec 2018 19:22:15 +0000 (19:22 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 14 May 2019 14:28:32 +0000 (15:28 +0100)
commit548a932ac786d6bf3584e4b54f2ab993e1117710
treef0b940c90a3b5ab462e9f581352ed3e5bb2d8f0c
parentd4f6116c080dc013cd1204c4d8ceb95e5f278689
x86/spec-ctrl: Infrastructure to use VERW to flush pipeline buffers

Three synthetic features are introduced, as we need individual control of
each, depending on circumstances.  A later change will enable them at
appropriate points.

The verw_sel field doesn't strictly need to live in struct cpu_info.  It lives
there because there is a convenient hole it can fill, and it reduces the
complexity of the SPEC_CTRL_EXIT_TO_{PV,HVM} assembly by avoiding the need for
any temporary stack maintenance.

This is part of XSA-297, CVE-2018-12126, CVE-2018-12127, CVE-2018-12130, CVE-2019-11091.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/x86_64/asm-offsets.c
xen/include/asm-x86/cpufeatures.h
xen/include/asm-x86/current.h
xen/include/asm-x86/spec_ctrl.h
xen/include/asm-x86/spec_ctrl_asm.h