From: Jan Kiszka <jan.kiszka@web.de>
To: Alan Amaral <alan.amaral@virtualcomputer.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"rth@twiddle.net" <rth@twiddle.net>
Subject: Re: [Qemu-devel] pci_change_irq_level is broken...
Date: Wed, 21 Sep 2011 18:33:39 +0200 [thread overview]
Message-ID: <4E7A11E3.4030609@web.de> (raw)
In-Reply-To: <179EEE32-724C-4349-B568-AF8A8B85721A@mimectl>
[-- Attachment #1: Type: text/plain, Size: 1569 bytes --]
On 2011-09-21 18:26, Alan Amaral wrote:
>
>
>
>
> 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...
>
>> On 2011-09-20 21:19, Alan Amaral wrote:
>>> QEMU emulator version 0.14.50, Copyright (c) 2003-2008 Fabrice Bellard
>>
>> (That's an ambitious development version.)
>
> It's what we're using.
>
>>>
>>> You are correct, it's not hardcoded to 4. However, when it's allocated the number of elements IS 4. Also,
>>> there's a comment just above pci_set_irq which says:
>>>
>>> /* 0 <= irq_num <= 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 returns
>> 0..3 via pci_slot_get_pirq. Xen uses some more, but also looks safe.
>
> 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().
>
> PCIBus *i440fx_xen_init(PCII440FXState **pi440fx_state, int *piix3_devfn,
> qemu_irq *pic, ram_addr_t ram_size)
> {
> PCIBus *b;
> b = 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
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
next prev parent reply other threads:[~2011-09-21 16:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-21 16:26 [Qemu-devel] pci_change_irq_level is broken Alan Amaral
2011-09-21 16:33 ` Jan Kiszka [this message]
2011-09-21 16:38 ` Alan Amaral
-- strict thread matches above, loose matches on Subject: below --
2011-09-20 17:24 Alan Amaral
2011-09-20 18:57 ` Richard Henderson
2011-09-20 19:19 ` Alan Amaral
2011-09-20 19:41 ` Jan Kiszka
2011-09-20 19:56 ` Richard Henderson
2011-09-21 16:34 ` Alan Amaral
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E7A11E3.4030609@web.de \
--to=jan.kiszka@web.de \
--cc=alan.amaral@virtualcomputer.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.