Hi Alex/Paolo, We talked a few months ago (some of which can be seen here https://www.spinics.net/lists/kvm/msg217578.html) about adding platform IRQ forwarding for platform devices behind PCI controller/adapter devices (for use when the PCI parent device gets assigned to a VM guest through vfio-pci). Thinking through how it would work, I've run into the problem that the IOAPIC (https://pdos.csail.mit.edu/6.828/2018/readings/ia32/ioapic.pdf) that kvm/QEMU emulate for forwarding platform/PCI interrupts to the guest is quite limited in terms of free/unused IRQs available for use (section 2.4 in the ioapic.pdf above gives descriptions).
I think I'm not the first one to encounter a lack of legacy IRQ slots on x86 kvm/QEMU, as here's an example of QEMU's emulated TPM choosing to use polling instead of interrupts for what I think is the same reason: https://www.qemu.org/docs/master/specs/tpm.html#acpi-interface A few questions: 1) Are you aware of anyone ever looking at modernizing the IOAPIC? I assume this isn't a priority for VFIO since most high speed/performance HW devices don't use legacy interrupts. I guess it's not a big issue for kvm/QEMU either since there are not many new platform devices coming along that people want to emulate for VM guests (TPM being an exception here). 2) If one was to add more IRQs to the IOAPIC would it be a requirement to find a datasheet from some newer hardware and perfectly emulate that newer hardware for a more modernized IOAPIC? Or would something like hacking the 82093AA emulation code to support more than 24 IRQs be within the realm of possibility? Is it even meaningful for guest VMs to "think" they're talking to an ancient IOAPIC from 1996? 3) Was there ever any consideration of making the IOAPIC a virtio/paravirtualized device rather than an emulated device? I figure if there's no reasonable hope of running an x86 VM with QEMU/kvm with more than 24 IRQ slots then I may look at repurposing PCI INTx/MSI to forward platform interrupts that come from devices behind PCI controllers (if the platform IRQ is level triggered use INTx and edge triggered use MSI). I'm sure that's a whole new can of worms though. Thanks, Micah _______________________________________________ vfio-users mailing list vfio-users@redhat.com https://www.redhat.com/mailman/listinfo/vfio-users