]> xenbits.xensource.com Git - xen.git/commit
x86/spec-ctrl: Rework ibpb_calculations()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 27 Jul 2023 19:03:28 +0000 (20:03 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 8 Aug 2023 14:19:49 +0000 (15:19 +0100)
commit292f68fb77196a35ac92b296792770d0f3190d75
tree5e73f55f5b3d67bc7532a3b65850aa1aa9d88320
parent46c5ef609b09cf51d7535aebbc05816eafca4c8d
x86/spec-ctrl: Rework ibpb_calculations()

... in order to make the SRSO mitigations easier to integrate.

 * Check for AMD/Hygon CPUs directly, rather than assuming based on IBPB.
   In particular, Xen supports synthesising the IBPB bit to guests on Intel to
   allow IBPB while dissuading the use of (legacy) IBRS.
 * Collect def_ibpb_entry rather than opencoding the BTC_NO calculation for
   both opt_ibpb_entry_{pv,hvm}.

No functional change.

This is part of XSA-434 / CVE-2023-20569

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
xen/arch/x86/spec_ctrl.c