[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] x86/emul: Assert the STI shadow when POPF sets the interrupt flag



Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 xen/arch/x86/x86_emulate/x86_emulate.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c 
b/xen/arch/x86/x86_emulate/x86_emulate.c
index e69dfdd..e93532d 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -4061,6 +4061,12 @@ x86_emulate(
             }
         }
         dst.val &= EFLAGS_MODIFIABLE;
+
+        /* When IF transitions from 0 to 1, assert the STI shadow. */
+        if ( !(_regs.eflags & X86_EFLAGS_IF) &&
+             ((dst.val & ~mask) & X86_EFLAGS_IF) )
+            ctxt->retire.sti = true;
+
         _regs.eflags &= mask;
         _regs.eflags |= (dst.val & ~mask) | X86_EFLAGS_MBS;
         break;
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.