Skip to contentSkip to conversation

Fix #GPF injection into compat guests in vm86 code

PATCH New Tim Deegan 1 participant 1 message Jun 30, 2010

lore
Share & tools
lore

Tim Deegan

author
#0 lore raw

PATCH 1/1 Fix #GPF injection into compat guests in vm86 code

Fix #GPF injection into compat guests in vm86 code not to let the guest disable interrupts in the real EFLAGS.

This should be applied to all stable branches too, please.

xen/arch/x86/x86_64/compat/traps.c +2 -3
diff -r eae66d92cee1 xen/arch/x86/x86_64/compat/traps.c
@@ -101,9 +101,8 @@
         ti = &v->arch.guest_context.trap_ctxt[13];
         if ( TI_GET_IF(ti) )
             eflags &= ~X86_EFLAGS_IF;
-        regs->_eflags = eflags & ~(X86_EFLAGS_VM|X86_EFLAGS_RF|
-                                   X86_EFLAGS_NT|X86_EFLAGS_TF);
-
+        regs->_eflags &= ~(X86_EFLAGS_VM|X86_EFLAGS_RF|
+                           X86_EFLAGS_NT|X86_EFLAGS_TF);
         if ( unlikely(__put_user(0, (u32 *)regs->rsp)) )
             goto exit_and_crash;
         regs->_eip = ti->address;