From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laurent Vivier Subject: Re: [PATCH] KVM: VMX: Leave atomic context while emulating real mode Date: Wed, 10 Sep 2008 16:12:09 +0200 Message-ID: <1221055929.4232.11.camel@frecb07144> References: <20080820140100.07333250A43@il.qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: KVM To: Avi Kivity Return-path: Received: from ecfrec.frec.bull.fr ([129.183.4.8]:46122 "EHLO ecfrec.frec.bull.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751264AbYIJOMO (ORCPT ); Wed, 10 Sep 2008 10:12:14 -0400 In-Reply-To: <20080820140100.07333250A43@il.qumranet.com> Sender: kvm-owner@vger.kernel.org List-ID: Le mercredi 20 ao=C3=BBt 2008 =C3=A0 14:01 +0000, Avi Kivity a =C3=A9cr= it : > From: Avi Kivity >=20 > Emulation requires access to user memory, and potentially schedules. >=20 > Signed-off-by: Avi Kivity >=20 > diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c > index d5d25a2..81c121c 100644 > --- a/arch/x86/kvm/vmx.c > +++ b/arch/x86/kvm/vmx.c > @@ -2911,6 +2911,9 @@ static void handle_invalid_guest_state(struct k= vm_vcpu *vcpu, > struct vcpu_vmx *vmx =3D to_vmx(vcpu); > int err; > =20 > + preempt_enable(); > + local_irq_enable(); > + > while (!guest_state_valid(vcpu)) { > err =3D emulate_instruction(vcpu, kvm_run, 0, 0, 0); > =20 > @@ -2932,6 +2935,9 @@ static void handle_invalid_guest_state(struct k= vm_vcpu *vcpu, > schedule(); > } > =20 > + local_irq_disable(); > + preempt_enable(); should be a preempt_disable() ? > /* Guest state should be valid now, no more emulation should be nee= ded */ > vmx->emulation_required =3D 0; > } > -- > To unsubscribe from this list: send the line "unsubscribe kvm-commits= " in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >=20 --=20 ----------------- Laurent.Vivier@bull.net ------------------ "La perfection est atteinte non quand il ne reste rien =C3=A0 ajouter mais quand il ne reste rien =C3=A0 enlever." Saint Exup=C3=A9ry