]> xenbits.xensource.com Git - xen.git/commit
x86/ctxt: Issue a speculation barrier between vcpu contexts
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 14 Feb 2018 10:43:57 +0000 (11:43 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 14 Feb 2018 10:43:57 +0000 (11:43 +0100)
commitbe261bd97f7b4fc76db7c11bb3366974f5635a04
tree475112e176db9cb61fd3d78c5c58f9ccd64cc94e
parent327a7836744ca8d7e1cfc6dc476d51d7c63f68ea
x86/ctxt: Issue a speculation barrier between vcpu contexts

Issuing an IBPB command flushes the Branch Target Buffer, so that any poison
left by one vcpu won't remain when beginning to execute the next.

The cost of IBPB is substantial, and skipped on transition to idle, as Xen's
idle code is robust already.  All transitions into vcpu context are fully
serialising in practice (and under consideration for being retroactively
declared architecturally serialising), so a cunning attacker cannot use SP1 to
try and skip the flush.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: a2ed643ed783020f885035432e9c0919756921d1
master date: 2018-01-26 14:10:21 +0000
docs/misc/xen-command-line.markdown
xen/arch/x86/domain.c
xen/arch/x86/spec_ctrl.c
xen/include/asm-x86/spec_ctrl.h