[PATCH 1/2] vfio: Replace the DMA unmapping notifier with a callback
Jason Gunthorpe
jgg at nvidia.com
Tue Jun 7 22:40:05 UTC 2022
On Tue, Jun 07, 2022 at 08:57:52AM -0300, Jason Gunthorpe wrote:
> On Tue, Jun 07, 2022 at 07:39:55AM +0200, Christoph Hellwig wrote:
>
> > > +static int vfio_iommu_notifier(struct notifier_block *nb, unsigned long action,
> > > + void *data)
> > > +{
> > > + struct vfio_device *vfio_device =
> > > + container_of(nb, struct vfio_device, iommu_nb);
> > > + struct vfio_iommu_type1_dma_unmap *unmap = data;
> >
> > Using the iommu type 1 UAPI structure in the core vfio code for a
> > subset of its field is kinda weird. But we can fix this later.
>
> Ah, I did type this in at one point.. It was small lets include it in
> this patch
Oh I got this explanation mixed up - forgot about this vesitgual bit
The patch is split in two: this patch removes the
vfio_iommu_type1_dma_unmap from all the drivers but leaves the type1
code as-is and bridges it here, the next patch changes the type1 code
to direcly call the op and deletes this function. So this weirdness is
fully deleted by the end of the series.
Jason
More information about the dri-devel
mailing list