From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K3vys-0000tV-MA for qemu-devel@nongnu.org; Wed, 04 Jun 2008 12:36:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K3vyr-0000qo-3Q for qemu-devel@nongnu.org; Wed, 04 Jun 2008 12:36:58 -0400 Received: from [199.232.76.173] (port=41023 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K3vyq-0000qg-Pk for qemu-devel@nongnu.org; Wed, 04 Jun 2008 12:36:56 -0400 Received: from ns.suse.de ([195.135.220.2]:35726 helo=mx1.suse.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1K3vyp-0003PV-Qb for qemu-devel@nongnu.org; Wed, 04 Jun 2008 12:36:56 -0400 Message-ID: <4846B726.2040409@suse.de> Date: Wed, 04 Jun 2008 17:39:18 +0200 From: Alexander Graf MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------070007090409080907020208" Subject: [Qemu-devel] [PATCH] Don't trap STGI within VMRUN Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------070007090409080907020208 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 --------------070007090409080907020208 Content-Type: text/x-patch; name="qemu-svn-stgi.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="qemu-svn-stgi.patch" 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)); --------------070007090409080907020208--