From patchwork Fri Apr 19 02:52:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: liguang X-Patchwork-Id: 237823 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id DBD932C01E5 for ; Fri, 19 Apr 2013 12:55:03 +1000 (EST) Received: from localhost ([::1]:41323 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UT1Ta-00017p-5b for incoming@patchwork.ozlabs.org; Thu, 18 Apr 2013 22:55:02 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37382) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UT1T0-00017Q-Pl for qemu-devel@nongnu.org; Thu, 18 Apr 2013 22:54:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UT1Sz-00009d-Rf for qemu-devel@nongnu.org; Thu, 18 Apr 2013 22:54:26 -0400 Received: from [222.73.24.84] (port=14051 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UT1Sz-00008z-GL for qemu-devel@nongnu.org; Thu, 18 Apr 2013 22:54:25 -0400 X-IronPort-AV: E=Sophos;i="4.87,505,1363104000"; d="scan'208";a="7092334" Received: from unknown (HELO tang.cn.fujitsu.com) ([10.167.250.3]) by song.cn.fujitsu.com with ESMTP; 19 Apr 2013 10:51:40 +0800 Received: from fnstmail02.fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id r3J2sHQL012949; Fri, 19 Apr 2013 10:54:18 +0800 Received: from liguang.fnst.cn.fujitsu.com ([10.167.233.147]) by fnstmail02.fnst.cn.fujitsu.com (Lotus Domino Release 8.5.3) with ESMTP id 2013041910525056-675768 ; Fri, 19 Apr 2013 10:52:50 +0800 From: liguang To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Fri, 19 Apr 2013 10:52:22 +0800 Message-Id: <1366339945-17151-4-git-send-email-lig.fnst@cn.fujitsu.com> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1366339945-17151-1-git-send-email-lig.fnst@cn.fujitsu.com> References: <1366339945-17151-1-git-send-email-lig.fnst@cn.fujitsu.com> X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/04/19 10:52:50, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/04/19 10:52:55, Serialize complete at 2013/04/19 10:52:55 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 222.73.24.84 Cc: blauwirbel@gmail.com, pbonzini@redhat.com, aliguori@us.ibm.com, afaerber@suse.de, liguang Subject: [Qemu-devel] [PATCH 3/6] target-i386/svm_helper: replace env->eip with EIP X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: liguang --- target-i386/svm_helper.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/target-i386/svm_helper.c b/target-i386/svm_helper.c index c46a213..f9ffd18 100644 --- a/target-i386/svm_helper.c +++ b/target-i386/svm_helper.c @@ -249,7 +249,7 @@ void helper_vmrun(CPUX86State *env, int aflag, int next_eip_addend) R_DS); EIP = ldq_phys(env->vm_vmcb + offsetof(struct vmcb, save.rip)); - env->eip = EIP; + EIP = EIP; ESP = ldq_phys(env->vm_vmcb + offsetof(struct vmcb, save.rsp)); EAX = ldq_phys(env->vm_vmcb + offsetof(struct vmcb, save.rax)); env->dr[7] = ldq_phys(env->vm_vmcb + offsetof(struct vmcb, save.dr7)); @@ -541,7 +541,7 @@ void helper_svm_check_io(CPUX86State *env, uint32_t port, uint32_t param, if (lduw_phys(addr + port / 8) & (mask << (port & 7))) { /* next EIP */ stq_phys(env->vm_vmcb + offsetof(struct vmcb, control.exit_info_2), - env->eip + next_eip_addend); + EIP + next_eip_addend); helper_vmexit(env, SVM_EXIT_IOIO, param | (port << 16)); } } @@ -605,7 +605,7 @@ void helper_vmexit(CPUX86State *env, uint32_t exit_code, uint64_t exit_info_1) stq_phys(env->vm_vmcb + offsetof(struct vmcb, save.rflags), cpu_compute_eflags(env)); stq_phys(env->vm_vmcb + offsetof(struct vmcb, save.rip), - env->eip); + EIP); stq_phys(env->vm_vmcb + offsetof(struct vmcb, save.rsp), ESP); stq_phys(env->vm_vmcb + offsetof(struct vmcb, save.rax), EAX); stq_phys(env->vm_vmcb + offsetof(struct vmcb, save.dr7), env->dr[7]);