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

[Xen-devel] [PATCH] 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. 

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r eae66d92cee1 xen/arch/x86/x86_64/compat/traps.c
--- a/xen/arch/x86/x86_64/compat/traps.c        Wed Mar 24 15:26:57 2010 +0000
+++ b/xen/arch/x86/x86_64/compat/traps.c        Wed Mar 24 15:54:23 2010 +0000
@@ -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;

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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