[ ... ] >>> +static qemu_irq spapr_qirq_dual(sPAPRMachineState *spapr, int irq) >>> +{ >>> + return spapr_irq_current(spapr)->qirq(spapr, irq); >>> +} >> >> This still makes me really nervous - I'd really prefer to have qirqs >> independent of the backend, rather than relying on *every* irq using >> device never looking up qirqs in advance. > > I will take a look. This is a large rework I won't have time to address > this year. I have removed the dual machine from v9. > > You would move the qirq array at the machine level ?
I took a look today and did a few changes : - move the qirq array at the machine level - introduced a 'set_irq' method to sPAPR IRQ - adapted the 'qirq' method of sPAPR IRQ. We still need to perform some checks and to handle the IRQ number offset. It falls well in place, a part for the ICS source of the PnvPSI model which does not have any qirq anymore. For PSI, I am thinking of moving the qirq array under PnvPSI model, like I did for the machine. Would that be ok ? I think there are a couple more possible cleanups on the different ICS models to do if these changes are acceptable. C.