pci_set_irq_fn: problematic interface
Hi,
I'm trying to clean up piix_pci.c by putting the static state variables in into a device state structure. But I hit a problem with piix4_dev and pci_gt64120_set_irq(). The latter wants to access piix4_dev outside of piix_pci.c. Because the PCI IRQ function does not take any device handle as a parameter, this is a bit difficult to fix.
So, perhaps pci_set_irq_fn should be changed to typedef void (*pci_set_irq_fn)(void *opaque, qemu_irq *pic, int irq_num, int level),
where opaque supplies device state for the piix3/piix4?