Skip to contentSkip to conversation

pci_set_irq_fn: problematic interface

Qemu-devel Blue Swirl 1 participant 1 message Jun 17, 2009

lore
Share & tools
lore

Blue Swirl

author
#0 lore raw

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?