Re: [RFC PATCH v6 08/11] iommufd: Add vIOMMU provider support

From: Jason Gunthorpe

Date: Thu Sep 24 2026 - 15:42:52 EST


> vIOMMU creation currently dispatches directly through the physical IOMMU
> driver. Some vIOMMU types need an implementation supplied by another
> subsystem, together with private data whose lifetime extends across all
> vIOMMUs using that implementation.
>
> Introduce a vIOMMU provider that associates implementation operations,
> their module owner and private data. Allow one external provider to
> register for each non-default vIOMMU type.

This seems much more extensive than I imagined when I proposed this.

I imagined you'd just have iommufd see there is a TSM attached the pci
device with a function call, and check if that TSM handled the
requested iommu ID.

No need for a registration system because we already know the only
possible TSM driver that can handle it, indeed a registration system
makes this more fraught since that key relationship is no longer
guarenteed.

--
Jason