x86/tsx: Cope with TSX deprecation on WHL-R/CFL-R
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 16 Sep 2020 15:15:52 +0000 (16:15 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 8 Feb 2022 18:01:32 +0000 (18:01 +0000)
commit0c46d108b74bd38e0887cdd02cb82dd1084586cb
tree56d99d56cd7f20eeb7059bdfa4e152cc7d6e334b
parent0ce302cfd6a9fa97328208f9fd02daf02cf5c3ad
x86/tsx: Cope with TSX deprecation on WHL-R/CFL-R

The February 2022 microcode is formally de-featuring TSX on the TAA-impacted
client CPUs.  The backup TAA mitigation (VERW regaining its flushing side
effect) is being dropped, meaning that `smt=0 spec-ctrl=md-clear` no longer
protects against TAA on these parts.

The new functionality enumerates itself via the RTM_ALWAYS_ABORT CPUID
bit (the same as June 2021), but has its control in MSR_MCU_OPT_CTRL as
opposed to MSR_TSX_FORCE_ABORT.

TSX now defaults to being disabled on ucode load.  Furthermore, if SGX is
enabled in the BIOS, TSX is locked and cannot be re-enabled.  In this case,
override opt_tsx to 0, so the RTM/HLE CPUID bits get hidden by default.

While updating the command line documentation, take the opportunity to add a
paragraph explaining what TSX being disabled actually means, and how migration
compatibility works.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
(cherry picked from commit ad9f7c3b2e0df38ad6d54f4769d4dccf765fbcee)
docs/misc/xen-command-line.pandoc
xen/arch/x86/spec_ctrl.c
xen/arch/x86/tsx.c
xen/include/asm-x86/msr-index.h