On Fri, Apr 15, 2022 at 09:25:10AM -0300, Jason Gunthorpe wrote: > The PPC specific iommu_table_group is PPC's "drvdata" for the common > struct iommu_group - it is obtained trivially by group->iommu_data > > I think using iommu_group as the handle for it in common code is the > right thing to do. > > What I don't entirely understand is what is 'tablefd' doing in all > this, or why the lookup of the kvmppc_spapr_tce_table is so > weird. PPC's unique iommu uapi is still a mystery to me. Yeah. So I guess we should go with something like this patch for now. Eventually as part of the actual iommufd work we'll need to unwind the PPC stuff anyway.