From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH] fix -no-kvm-irqchip regression Date: Thu, 14 Aug 2008 08:24:47 +0200 Message-ID: <48A3CFAF.6030205@web.de> References: <4881A93E.5050402@web.de> <488396BE.9090909@web.de> <4885B8AA.50105@qumranet.com> <48A295B2.3060501@web.de> <20080813234045.GK26466@duo.random> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig50FEB8385CD34AB6D287F860" Cc: Avi Kivity , kvm-devel To: Andrea Arcangeli Return-path: Received: from fmmailgate02.web.de ([217.72.192.227]:37922 "EHLO fmmailgate02.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751331AbYHNGY4 (ORCPT ); Thu, 14 Aug 2008 02:24:56 -0400 In-Reply-To: <20080813234045.GK26466@duo.random> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig50FEB8385CD34AB6D287F860 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Andrea Arcangeli wrote: > On Wed, Aug 13, 2008 at 10:05:06AM +0200, Jan Kiszka wrote: >> Should this issue have been fixed meanwhile? I just gave latest git a >> try and - as far as I recall my tests before holiday correctly - thing= s >> look the same. At least some Linux 2.6.23 kernel still hangs here duri= ng >> early boot with -no-kvm-irqchip. >=20 > The trouble was that clearing the idt_vectoring_info before handling > the exit_reason would lead to the handle_exception to fail setting the > irq_pending bit because is_external_interrupt was run on zero instead > of the vmcs IDT_VECTORING_INFO_FIELD, so it didn't notice it was an > external interrupt generating the exit. >=20 > This makes the userland irqchip code work again for me, there seem to > be no good reason to clear this value before returning in guest mode > and only setting it to zero didn't look an effective debugging aid, so > it's a microoptimization for the kernel irqchip too. >=20 > Signed-off-by: Andrea Arcangeli Solves the issue here as well. Thanks. Tested-by: Jan Kiszka >=20 > diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c > index 337670b..3c82593 100644 > --- a/arch/x86/kvm/vmx.c > +++ b/arch/x86/kvm/vmx.c > @@ -2890,13 +2890,10 @@ static void vmx_complete_interrupts(struct vcpu= _vmx *vmx) > kvm_queue_exception_e(&vmx->vcpu, vector, error); > } else > kvm_queue_exception(&vmx->vcpu, vector); > - vmx->idt_vectoring_info =3D 0; > } > kvm_clear_interrupt_queue(&vmx->vcpu); > - if (idtv_info_valid && type =3D=3D INTR_TYPE_EXT_INTR) { > + if (idtv_info_valid && type =3D=3D INTR_TYPE_EXT_INTR) > kvm_queue_interrupt(&vmx->vcpu, vector); > - vmx->idt_vectoring_info =3D 0; > - } > } > =20 > static void vmx_intr_assist(struct kvm_vcpu *vcpu) >=20 --------------enig50FEB8385CD34AB6D287F860 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkijz7MACgkQniDOoMHTA+kb/ACeO2dsLjW7kl9BmRkA81vMN/g1 f+UAoIJGD8XeRdXtVWhmA5RNiCcrSsMO =n7H5 -----END PGP SIGNATURE----- --------------enig50FEB8385CD34AB6D287F860--