On Fri, Jun 10, 2011 at 04:59:08PM +0200, Markus Armbruster wrote:
> Anthony Liguori <aligu...@us.ibm.com> writes:
> 
> > On 06/10/2011 03:13 AM, Markus Armbruster wrote:
> >> Jan Kiszka<jan.kis...@siemens.com>  writes:
> >>> Resource management, e.g. IRQs. That will be useful for other types of
> >>> buses as well.
> >>
> >> A device should be able to say "I need to be connected to an IRQ line".
> >> Feels generic to me.
> >
> > More specifically, a device has input IRQs.  A device has no idea what
> > number the IRQ is tied to.
> >
> > Devices may also have output IRQs.  At the qdev layer, we should be
> > able to connect an arbitrary output IRQ to an arbitrary input IRQ.
> >
> > So the crux of the problem is that:
> >
> >  -device isa-serial,id=serial,irq=3
> >
> > Is very wrong.  It ought to look something more like
> >
> >  -device piix3,id=piix3 -device isa-serial,id=serial,irq=piix3.irq[3]
> 
> As Jan pointed out, ISA is a counter-example: your "very wrong" claim is
> actually wrong there :)
> 
> An ISA device is always connected to all the ISA bus's interrupt lines.
> Device configuration determines how the device uses these lines.
> 
> The old (non-MSI) PCI interrupts are similar, I think.
> 

Each PCI card has 4 irq pins INTA/INTB/INTC/INTD (usually only INTA is
used). Chipset has PCI irq router with one or more inputs (PIIX3 has
4 PIRQ[A:D]#).  Wiring on the motherboard determines which irq pin is
connect to which PCI irq router input. Different slots usually connect
the same interrupt line to a different router input in order to spread
INTA of different cards between different inputs. PCI irq router is
configured to route each input pin to a different (or same) GSI. OS can
reconfigure irq router at will using AML methods if they are provided.

--
                        Gleb.

Reply via email to