From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH non-atomic-injection] KVM: Initialize rip for real mode interrupt injection Date: Wed, 18 Aug 2010 17:09:22 +0300 Message-ID: <4C6BE992.7080103@redhat.com> References: <1282117001-14608-1-git-send-email-avi@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Mohammed Gamal Return-path: Received: from mx1.redhat.com ([209.132.183.28]:9158 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753439Ab0HROJ1 (ORCPT ); Wed, 18 Aug 2010 10:09:27 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 08/18/2010 03:46 PM, Mohammed Gamal wrote: > On Wed, Aug 18, 2010 at 10:36 AM, Avi Kivity wrote: >> Signed-off-by: Avi Kivity >> --- >> arch/x86/kvm/x86.c | 1 + >> 1 files changed, 1 insertions(+), 0 deletions(-) >> >> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c >> index f6a31a1..e2b0e36 100644 >> --- a/arch/x86/kvm/x86.c >> +++ b/arch/x86/kvm/x86.c >> @@ -3967,6 +3967,7 @@ int kvm_inject_realmode_interrupt(struct kvm_vcpu *vcpu, int irq) >> >> vcpu->arch.emulate_ctxt.decode.op_bytes = 2; >> vcpu->arch.emulate_ctxt.decode.ad_bytes = 2; >> + vcpu->arch.emulate_ctxt.decode.eip = kvm_rip_read(vcpu); > I think it'd make more sense to make > vcpu->arch.emulate_ctxt.decode.eip = vcpu->arch.emulate_ctxt.eip, as > we already initlialize the emulation context eip. It's not going to > make any real difference, but it's more readable this way I suppose, > and is symmetric to the assignment of the emulation context eip value > after the call to emulate_int_real() Right, patch updated. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.