From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:54189) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6Pk6-0003Jl-Az for qemu-devel@nongnu.org; Wed, 21 Sep 2011 12:33:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R6Pk2-0001Jj-4W for qemu-devel@nongnu.org; Wed, 21 Sep 2011 12:33:50 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]:44007) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6Pk1-0001JY-LJ for qemu-devel@nongnu.org; Wed, 21 Sep 2011 12:33:46 -0400 Message-ID: <4E7A11E3.4030609@web.de> Date: Wed, 21 Sep 2011 18:33:39 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <179EEE32-724C-4349-B568-AF8A8B85721A@mimectl> In-Reply-To: <179EEE32-724C-4349-B568-AF8A8B85721A@mimectl> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigB5EF92C8176F4A7CBF26189A" Sender: jan.kiszka@web.de Subject: Re: [Qemu-devel] pci_change_irq_level is broken... List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alan Amaral Cc: "qemu-devel@nongnu.org" , "rth@twiddle.net" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigB5EF92C8176F4A7CBF26189A Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2011-09-21 18:26, Alan Amaral wrote: > =20 >=20 >=20 >=20 > From: Jan Kiszka > Sent: Tue 9/20/2011 3:41 PM > To: Alan Amaral > Cc: Richard Henderson; qemu-devel@nongnu.org > Subject: Re: pci_change_irq_level is broken... >=20 >> On 2011-09-20 21:19, Alan Amaral wrote: >>> QEMU emulator version 0.14.50, Copyright (c) 2003-2008 Fabrice Bellar= d >> >> (That's an ambitious development version.) >=20 > It's what we're using. >=20 >>> >>> You are correct, it's not hardcoded to 4. However, when it's allocat= ed the number of elements IS 4. Also, >>> there's a comment just above pci_set_irq which says: >>> >>> /* 0 <=3D irq_num <=3D 3. level must be 0 or 1 */ >>> static void pci_set_irq(void *opaque, int irq_num, int level) >>> >>> so, that implies to me that it's probably always 4... Sorry for the = confusion. >> >> Assuming you look at PIIX3: Yes, it allocates 4 IRQs - but only return= s >> 0..3 via pci_slot_get_pirq. Xen uses some more, but also looks safe. >=20 > We are running under Xen and in this case it is using PIIX_NUM_PIRQS, > which is 4, as the last arg to pci_bus_irqs(). =20 >=20 > PCIBus *i440fx_xen_init(PCII440FXState **pi440fx_state, int *piix3_devf= n, > qemu_irq *pic, ram_addr_t ram_size) > { > PCIBus *b; > b =3D i440fx_common_init("i440FX-xen", pi440fx_state, piix3_devfn, = pic, ram_size); > pci_bus_irqs(b, xen_piix3_set_irq, xen_pci_slot_get_pirq, > (*pi440fx_state)->piix3, PIIX_NUM_PIRQS); > return b; > } bf09551a6b, aka "xen: fix interrupt routing". Jan --------------enigB5EF92C8176F4A7CBF26189A 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/ iEYEARECAAYFAk56EeYACgkQitSsb3rl5xQJCQCgpYX75IB6WoANmY+vhEjZclKa 5wEAoLNKUyYx2xlAPfER8YriiBVGQZo0 =Hy2X -----END PGP SIGNATURE----- --------------enigB5EF92C8176F4A7CBF26189A--