>>> On 14.02.18 at 12:10, <andrew.coop...@citrix.com> wrote:
> DO_OVERWRITE_RSB clobbers %rax, meaning in practice that 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.ostrov...@oracle.com>
> Reported-by: Zhenzhong Duan <zhenzhong.d...@oracle.com>
> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>
Reviewed-by: Jan Beulich <jbeul...@suse.com>
with one remark/suggestion:
> --- a/xen/include/asm-x86/spec_ctrl_asm.h
> +++ b/xen/include/asm-x86/spec_ctrl_asm.h
> @@ -79,10 +79,10 @@
> * - SPEC_CTRL_EXIT_TO_GUEST
> -.macro DO_OVERWRITE_RSB
> +.macro DO_OVERWRITE_RSB tmp=%rax
If only registers are supposed to be passed as macro arguments,
I generally consider it better to leave specifying at least the % to
the macro body - that way nothing else (like a memory operand,
perhaps referencing %rsp in a dangerous way) can be passed, as
the assembler will choke on invalid names following %. In order to
have the flexibility to also use the 32-bit register name inside the
macro, I would also generally omit the r (but this is less of a concern
here, as it's quite unlikely for the 32-bit name to be needed).
Xen-devel mailing list