On Tue, Nov 07, 2023 at 04:06:41PM -0700, Alex Williamson wrote: > A vfio-pci variant driver is specifically a driver that leverages > portions of vfio-pci-core for implementing vfio_device_ops and binds to > a PCI device. It might actually be the wrong term here, but I jumped > to that since the series tries to generalize portions of one of the > vfio-pci-core code paths. You might very well be intending to use this > with something more like an mdev driver, which is fine. IDXD will be a SIOV device and we need to have a serious talk about how SIOV device lifecycle will work.. > That also sort of illustrates the point though that this series is > taking a pretty broad approach to slicing up vfio-pci-core's SET_IRQS > ioctl code path, enabling support for IMS backed interrupts, but in > effect complicating the whole thing without any actual consumer to > justify the complication. Meanwhile I think the goal is to reduce > complication to a driver that doesn't exist yet. So it currently seems > like a poor trade-off. I think we need to see some draft of the IDXD driver to really understand this > This driver that doesn't exist yet could implement its own SET_IRQS > ioctl that backs MSI-X with IMS as a starting point. Presumably we > expect multiple drivers to require this behavior, so common code makes > sense, but the rest of us in the community can't really evaluate how > much it makes sense to slice the common code without seeing that > implementation and how it might leverage, if not directly use, the > existing core code. I've been seeing a general interest in taking something that is not MSI-X (eg "IMS" for IDXD) and converting it into MSI-X for the vPCI function. I think this will be a durable need in this space. Ideally it will be overtaken by simply teaching the guest, vfio and the hypervisor interrupt logic how to directly generate interrupts with a guest controlled addr/data pair without requiring MSI-X trapping. That is the fundamental reason why this has to be done this convoluted way. Jason