From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K3vIs-0006QA-FL for qemu-devel@nongnu.org; Wed, 04 Jun 2008 11:53:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K3vIq-0006Py-53 for qemu-devel@nongnu.org; Wed, 04 Jun 2008 11:53:33 -0400 Received: from [199.232.76.173] (port=43067 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K3vIp-0006Pv-VE for qemu-devel@nongnu.org; Wed, 04 Jun 2008 11:53:32 -0400 Received: from mx2.suse.de ([195.135.220.15]:43436) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1K3vIp-0002vx-TJ for qemu-devel@nongnu.org; Wed, 04 Jun 2008 11:53:32 -0400 Message-ID: <4846AD03.5070908@suse.de> Date: Wed, 04 Jun 2008 16:56:03 +0200 From: Alexander Graf MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050709060408020904030908" Subject: [Qemu-devel] [PATCH] VMRUN should store the RIP after the instruction 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. --------------050709060408020904030908 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit VMRUN stores the IP which is used to return to the instruction after the VMRUN in case of a VMEXIT. Due to recent changes, this does not happen anymore and a VMEXIT simply returns to the VMRUN instruction. Alex --------------050709060408020904030908 Content-Type: text/x-patch; name="qemu-svn-rip.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="qemu-svn-rip.patch" Index: target-i386/op_helper.c =================================================================== --- target-i386/op_helper.c (revision 4661) +++ target-i386/op_helper.c (working copy) @@ -4836,7 +4836,7 @@ svm_save_seg(env->vm_hsave + offsetof(struct vmcb, save.ds), &env->segs[R_DS]); - stq_phys(env->vm_hsave + offsetof(struct vmcb, save.rip), EIP); + stq_phys(env->vm_hsave + offsetof(struct vmcb, save.rip), EIP + 3); stq_phys(env->vm_hsave + offsetof(struct vmcb, save.rsp), ESP); stq_phys(env->vm_hsave + offsetof(struct vmcb, save.rax), EAX); --------------050709060408020904030908--