From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40569) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y7Sqk-00078M-Ge for qemu-devel@nongnu.org; Sat, 03 Jan 2015 12:50:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y7Sqf-000416-H7 for qemu-devel@nongnu.org; Sat, 03 Jan 2015 12:50:54 -0500 Received: from mail4.gandi.net ([217.70.183.210]:52288 helo=gandi.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y7Sqf-00040z-Ag for qemu-devel@nongnu.org; Sat, 03 Jan 2015 12:50:49 -0500 Date: Sat, 3 Jan 2015 18:50:43 +0100 From: William Dauchy Message-ID: <20150103175043.GA5219@gandi.net> References: <201412311145449265941@tencent.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OXfL5xGRrasGEqWY" Content-Disposition: inline In-Reply-To: <201412311145449265941@tencent.com> Subject: Re: [Qemu-devel] [PATCH] Fix irq route entries exceed KVM_MAX_IRQ_ROUTES List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?B?a2V2aW5ubWEo6ams5paH6ZycKQ==?= , pbonzini Cc: qemu-devel --OXfL5xGRrasGEqWY Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Dec31 03:45, kevinnma(=E9=A9=AC=E6=96=87=E9=9C=9C) wrote: > diff --git a/kvm-all.c b/kvm-all.c > index 18cc6b4..f47e1b1 100644 > --- a/kvm-all.c > +++ b/kvm-all.c > @@ -1123,6 +1123,17 @@ static int kvm_irqchip_get_virq(KVMState *s) > int i, bit; > bool retry =3D true; > =20 > + /* > + * PIC and IOAPIC share the first 15 GSI numbers,available GSI > + * numbers greater than IRQ route entries. If allocate GSI number > + * succeeds, a new route entry can be added, so total IRQ route > + * enties can exceed gsi_count, flush dynamic MSI entries when > + * IRQ route entries arrive gsi_count. > + */ > + if (!s->direct_msi && s->irq_routes->nr =3D=3D s->gsi_count) { > + kvm_flush_dynamic_msi_routes(s); > + } > + > again: > /* Return the lowest unused GSI in the bitmap */ > for (i =3D 0; i < max_words; i++) { Any comments on this patch? --=20 William --OXfL5xGRrasGEqWY Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlSoK/MACgkQ1I6eqOUidQFIygCgo9FBH0igZRT1pJp1vT7RU1NJ SN4AoLucxRCTXlSDDsYRNB1NG5gsof4D =DBu0 -----END PGP SIGNATURE----- --OXfL5xGRrasGEqWY--