]> xenbits.xensource.com Git - xen.git/commitdiff
x86: correct EFLAGS.IF in SYSENTER frame
authorJan Beulich <jbeulich@suse.com>
Fri, 16 Mar 2018 16:27:36 +0000 (17:27 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 16 Mar 2018 16:27:36 +0000 (17:27 +0100)
Commit 9d1d31ad94 ("x86: slightly reduce Meltdown band-aid overhead")
moved the STI past the PUSHF. While this isn't an active problem (as we
force EFLAGS.IF to 1 before exiting to guest context), let's not risk
internal confusion by finding a PV guest frame with interrupts
apparently off.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/x86_64/entry.S

index f6ba31c4e20b70872fe4be012b359c90ad07b5d5..e3d18daba828943205a0460a659e5fb464e99fe6 100644 (file)
@@ -281,6 +281,8 @@ GLOBAL(sysenter_eflags_saved)
         /* WARNING! `ret`, `call *`, `jmp *` not safe before this point. */
 
         GET_STACK_END(bx)
+        /* PUSHF above has saved EFLAGS.IF clear (the caller had it set). */
+        orl   $X86_EFLAGS_IF, UREGS_eflags(%rsp)
         mov   STACK_CPUINFO_FIELD(xen_cr3)(%rbx), %rcx
         neg   %rcx
         jz    .Lsyse_cr3_okay