I've been looking at handling of msix masking in qemu. It looks like all of virtio,vfio and device assignment implemented their own similar but slightly different thing. So I am inclined to move this handling to common code in msix.c, adding irqfd support right there.
While doing this rework, one of the more painful bits of code to change is the code that dynamically allocates msix table entries as we inject msi. If this actually triggers it's going to be painfully slow as route changes are rcu write side in kernel. Since recent kernels support direct injection, do we care anymore? I think if you run out of vectors, it's better to simply disable irqchip than try to limp along changing routes all the time. Comments? -- MST