OK so what we know now is that is should not be related to the network card driver as it happens with other devices sharing the interrupt so maybe it's just network and passed through gfx card happen to generate the most interrupts so the problem happens more often when these are used. Since it's not related to any driver we can exclude those end problem is likely in emulation or kernel level.
The handling of PCI interrupts was added in this series:
https://patchew.org/QEMU/cover.1678188711.git.balaton@eik.bme.hu/which is the final version that was accepted but this takes some shortcuts and only works with the setting everything sharing IRQ9. This is a simplified version of my original approach here:
https://patchew.org/QEMU/cover.1678188711.git.balaton@eik.bme.hu/that kept track of individual interrupts and may have worked better but people did not like the complexity and we got to the simpler version which still seemed to work in testing. Later an alternative approach was suggested here:
https://patchew.org/QEMU/cover.1678105 ... 1.git.balaton@eik.bme.hu/
that returned to the original approach but relying on PCI addresses to identify sources rather than custom functions but it was too late in the release cycle to elaborate on that and nobody cared since.
The discussion and findings can be read at the above links and it also points to where and how this could be debugged further and what's the most likely place to fix it but I don't have time for it now so I'm posting it here in case somebody has time and wants to dig further into it. Since I don't have an easy way to reproduce it it eould also be a bit difficult for me to debug it now. I'd rather work on the boot loader first as that's something I at least have a clear path with and already made some progress with it so I'll finfish that first before trying to look at this which might take a few weeks so if anybody finds out something please let me know.
I'd like to add that even though this wasn't too far away I've already swapped out most of this from my brain so I'd have to reread the above and get back to it again too so not much better position to work on it than others (OK maybe I remember something about the devices emulation that I did before but other parts of QEMU I have to explore all the time too).