From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49846) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S6dUR-0004US-CY for qemu-devel@nongnu.org; Sun, 11 Mar 2012 03:46:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S6dUP-0002yQ-ED for qemu-devel@nongnu.org; Sun, 11 Mar 2012 03:46:50 -0400 Received: from fmmailgate06.web.de ([217.72.192.247]:46174) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S6dUP-0002yG-4O for qemu-devel@nongnu.org; Sun, 11 Mar 2012 03:46:49 -0400 Received: from moweb001.kundenserver.de (moweb001.kundenserver.de [172.19.20.114]) by fmmailgate06.web.de (Postfix) with ESMTP id 7ED61E6BC3D for ; Sun, 11 Mar 2012 08:46:46 +0100 (CET) Message-ID: <4F5C585E.5020906@web.de> Date: Sun, 11 Mar 2012 08:46:38 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <1331449479-8197-1-git-send-email-liwp@linux.vnet.ibm.com> In-Reply-To: <1331449479-8197-1-git-send-email-liwp@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigEA4C8A223C31F295F92FB9D7" Subject: Re: [Qemu-devel] [PATCH] fix bug of isa_bus irq List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wanpeng Li Cc: Gavin Shan , Anthony Liguori , qemu-devel@nongnu.org, afaerber@suse.de, "Michael S. Tsirkin" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigEA4C8A223C31F295F92FB9D7 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable On 2012-03-11 08:04, Wanpeng Li wrote: > ISA bus only use IRQ 0~15, so don't need to give an array qemu_irq 0~23= , just > array qemu_irq i8259 is ok. >=20 > Signed-off-by: Wanpeng Li > --- > hw/pc_piix.c | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) >=20 > diff --git a/hw/pc_piix.c b/hw/pc_piix.c > index 63dba4e..52f7cf8 100644 > --- a/hw/pc_piix.c > +++ b/hw/pc_piix.c > @@ -210,7 +210,6 @@ static void pc_init1(MemoryRegion *system_memory, > isa_bus =3D isa_bus_new(NULL, system_io); > no_hpet =3D 1; > } > - isa_bus_irqs(isa_bus, gsi); > =20 > if (kvm_irqchip_in_kernel()) { > i8259 =3D kvm_i8259_init(isa_bus); > @@ -221,6 +220,8 @@ static void pc_init1(MemoryRegion *system_memory, > i8259 =3D i8259_init(isa_bus, cpu_irq[0]); > } > =20 > + isa_bus_irqs(isa_bus, i8259); > + > for (i =3D 0; i < ISA_NUM_IRQS; i++) { > gsi_state->i8259_irq[i] =3D i8259[i]; > } This is bogus. isa_bus_irqs sets the output IRQs of the ISA bus. And those are not only delivered to the PIC on the PIIX2, but also the IOAPIC. Thus we have to pass in the GSI input lines which dispatch to both. Of those lines, only the first 16 will be used by the ISA bus (there is even an assert to ensure this). Did you see any concrete bug in the context of this logic? Jan --------------enigEA4C8A223C31F295F92FB9D7 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.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk9cWGIACgkQitSsb3rl5xRkRwCff+YJzJ4wPVkxh2nArX3m0wRS x0AAoKnz479OhbN8Y3epcG9TmfUibeEX =u6B9 -----END PGP SIGNATURE----- --------------enigEA4C8A223C31F295F92FB9D7--