]> xenbits.xensource.com Git - xen.git/commit
x86/spec_ctrl: Fix several bugs in SPEC_CTRL_ENTRY_FROM_INTR_IST
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 6 Mar 2018 15:19:35 +0000 (16:19 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 6 Mar 2018 15:19:35 +0000 (16:19 +0100)
commit6a16018f72d1b1542d3f1ecbe0941810c2f734f0
tree72ad9e6fefe92f0fc0801d5c3c8afa790cf89bb5
parent4eeea069496ad92d7da92ea23f2a0af8e93c6657
x86/spec_ctrl: Fix several bugs in SPEC_CTRL_ENTRY_FROM_INTR_IST

DO_OVERWRITE_RSB clobbers %rax, meaning in practice that the bti_ist_info
field gets zeroed.  Older versions of this code had the DO_OVERWRITE_RSB
register selectable, so reintroduce this ability and use it to cause the
INTR_IST path to use %rdx instead.

The use of %dl for the %cs.rpl check means that when an IST interrupt hits
Xen, we try to load 1 into the high 32 bits of MSR_SPEC_CTRL, suffering a #GP
fault instead.

Also, drop an unused label which was a copy/paste mistake.

Reported-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reported-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
master commit: a2b08fbed388f18235fda5ba1655c1483ef3e215
master date: 2018-02-14 13:22:15 +0000
xen/include/asm-x86/spec_ctrl_asm.h