qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH] Don't trap STGI within VMRUN


From: Alexander Graf
Subject: [Qemu-devel] [PATCH] Don't trap STGI within VMRUN
Date: Wed, 04 Jun 2008 17:39:18 +0200
User-agent: Thunderbird 2.0.0.12 (X11/20071114)

If VMRUN gets called with the STGI trap set active, it traps within the VMRUN call itself, creating an endless loop.

This patch makes VMRUN set the GIF flag manually without calling helper_stgi. Thus it eliminates the trap.

Alex



Index: target-i386/op_helper.c
===================================================================
--- target-i386/op_helper.c     (revision 4661)
+++ target-i386/op_helper.c     (working copy)
@@ -4910,7 +4910,8 @@
         break;
     }
 
-    helper_stgi();
+    /* STGI to enable interrupts again */
+    env->hflags |= HF_GIF_MASK;
 
     /* maybe we need to inject an event */
     event_inj = ldl_phys(env->vm_vmcb + offsetof(struct vmcb, 
control.event_inj));

reply via email to

[Prev in Thread] Current Thread [Next in Thread]