Hi,

Am 03.12.25 um 15:42 schrieb Kapetanakis Giannis:
On 03/12/2025 15:17, Kapetanakis Giannis wrote:
Hi,

Is there a limit on number of vio devices?
This is my 13th vio device

virtio16 at pci0 dev 19 function 0 "Qumranet Virtio Network" rev 0x00
vio12 at virtio16: 4 queues, address 00:1a:4a:34:9f:60
failed to allocate interrupt slot for PIC msix pin -2147444734
vio12[2]: couldn't establish msix interrupt
vio12: cannot alloc q0 intr: 12
virtio16: virtio configuration failed

On 03/12/2025 16:02, Crystal Kolipe wrote:
Not exactly a limit on vio devices - in this case you seem to be exceeding the
number of available interrupt vectors.

On 03/12/2025 16:33, Kapetanakis Giannis wrote:
Is this tunable (sysctl) or does it need a custom kernel?

probably something bigger...

the fail comes from intr.c: intr_allocate_slot()
which (to my reading is limited by MAX_INTR_SOURCES)

/*
  * Maximum # of interrupt sources per CPU. 64 to fit in one word.
  * ioapics can theoretically produce more, but it's not likely to
  * happen. For multiple ioapics, things can be routed to different
  * CPUs.
  */
#define MAX_INTR_SOURCES        64
#define NUM_LEGACY_IRQS         16

And it seems that this came from vio multiques.
Each vio now has 4 queues and got hit by that hard limit

vmstat -i | grep vio|wc -l
       62


There are various limits on the number of interrupts. I am not sure which one your are hitting. At some point, the number of IDT slots runs out, maybe you are running into that limit. There is also this problem
https://marc.info/?l=openbsd-bugs&m=175405222313781&w=2

If you have access to your qemu config, the easiest workaround is to disable multiqueue. If you can't change the qemu config because it's a rented VM, you are out of luck at the moment or would need to recompile the kernel without multiqueue support.

Maybe we need to add a config(8) flag for vio to use fewer interrupt slots.


Reply via email to