The problem is that if we tie all controls via VFIO uAPI, the othervSVA is a per-device (either pdev or mdev) feature thus naturally should
subsystem like vDPA is likely to duplicate them. I wonder if there is a
way to decouple the vSVA out of VFIO uAPI?
be managed by its device driver (VFIO or vDPA). From this angle some
duplication is inevitable given VFIO and vDPA are orthogonal passthrough
frameworks. Within the kernel the majority of vSVA handling is done by
IOMMU and IOASID modules thus most logic are shared.
mdev is not exclusive from kernel usages. It's perfectly fine for a driverIf an userspace DMA interface can be easilyIt's not that easy even for VFIO which requires a lot of new uAPIs and
adapted to be a passthrough one, it might be the choice.
infrastructures(e.g mdev) to be invented.
But for idxd,A weak point for mdev is that it can't serve kernel subsystem other than
we see mdev a much better fit here, given the big difference between
what userspace DMA requires and what guest driver requires in this hw.
VFIO. In this case, you need some other infrastructures (like [1]) to do
this.
to reserve some work queues for host usages, while wrapping others
into mdevs.
Thanks
Kevin