]> xenbits.xensource.com Git - xen.git/commit
x86/spec-ctrl: Support BHI_DIS_S in order to mitigate BHI
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 26 Mar 2024 19:01:37 +0000 (19:01 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 9 Apr 2024 15:48:19 +0000 (16:48 +0100)
commit7d3ad6775d59ad292c3b6431e8eb73e10d191298
treef0cbce1142914e4b4600504a100025edd53e721e
parent02a424a7a8be13f6f85eb4fa2f43100b8e76f760
x86/spec-ctrl: Support BHI_DIS_S in order to mitigate BHI

Introduce a "bhi-dis-s" boolean to match the other options we have for
MSR_SPEC_CTRL values.  Also introduce bhi_calculations().

Use BHI_DIS_S whenever possible.

Guests which are levelled to be migration compatible with older CPUs can't see
BHI_DIS_S, and Xen must fill in the difference to make the guest safe.  Use
the virt MSR_SPEC_CTRL infrastructure to force BHI_DIS_S behind the guest's
back.

This is part of XSA-456 / CVE-2024-2201.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
(cherry picked from commit 62a1106415c5e8a49b45147ca84d54a58d471343)
docs/misc/xen-command-line.pandoc
xen/arch/x86/hvm/vmx/vmx.c
xen/arch/x86/include/asm/spec_ctrl.h
xen/arch/x86/spec_ctrl.c