Re: [PATCH 1/2] vfio: Replace the DMA unmapping notifier with a callback

2022-06-07 Thread Jason Gunthorpe
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 v

Re: [PATCH 1/2] vfio: Replace the DMA unmapping notifier with a callback

2022-06-07 Thread Jason Gunthorpe
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_devi

[PATCH 1/2] vfio: Replace the DMA unmapping notifier with a callback

2022-06-06 Thread Jason Gunthorpe
Instead of having drivers register the notifier with explicit code just have them provide a dma_unmap callback op in their driver ops and rely on the core code to wire it up. Suggested-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe --- drivers/gpu/drm/i915/gvt/gvt.h| 1 - driver