]> 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 12:44:01 +0000 (13:44 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 14 Feb 2018 12:44:01 +0000 (13:44 +0100)
commit8994cf3cf730422ded6596ecb18dc0d8b6579493
treeec837edbba7ed85bff5f39ad2297e5929d843ca2
parent642c6037bba310538b00c0cbb5d91525bd1eed0a
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