qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Don't trap STGI within VMRUN
@ 2008-06-04 15:39 Alexander Graf
  0 siblings, 0 replies; only message in thread
From: Alexander Graf @ 2008-06-04 15:39 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 236 bytes --]

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




[-- Attachment #2: qemu-svn-stgi.patch --]
[-- Type: text/x-patch, Size: 459 bytes --]

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));

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-06-04 16:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-04 15:39 [Qemu-devel] [PATCH] Don't trap STGI within VMRUN Alexander Graf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).