From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [RFC PATCH v2 4/4] x86 emulator: Eagerly commit emulation ctxt eip in emulate_int_real() Date: Sun, 15 Aug 2010 15:42:16 +0300 Message-ID: <4C67E0A8.8070504@redhat.com> References: <1281745181-4426-1-git-send-email-m.gamal005@gmail.com> <1281745181-4426-3-git-send-email-m.gamal005@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: mtosatti@redhat.com, kvm@vger.kernel.org To: Mohammed Gamal Return-path: Received: from mx1.redhat.com ([209.132.183.28]:64574 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758360Ab0HOQME (ORCPT ); Sun, 15 Aug 2010 12:12:04 -0400 In-Reply-To: <1281745181-4426-3-git-send-email-m.gamal005@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On 08/14/2010 03:19 AM, Mohammed Gamal wrote: > emulate_int_real() is to be used outside the emulator. Hence, we shouldn't > wait for writeback to write the eip value stored in the decode cache. Save it > in emulation context eagerly instead. > > Signed-off-by: Mohammed Gamal > --- > arch/x86/kvm/emulate.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c > index 32498e3..ae45b04 100644 > --- a/arch/x86/kvm/emulate.c > +++ b/arch/x86/kvm/emulate.c > @@ -1245,7 +1245,7 @@ int emulate_int_real(struct x86_emulate_ctxt *ctxt, > if (rc != X86EMUL_CONTINUE) > return rc; > > - c->eip = eip; > + ctxt->eip = eip; > > return rc; > } Doesn't seem right. It should work like the rest of the emulator. Instead, the wrapper code in x86.c should do this. -- error compiling committee.c: too many arguments to function