[PATCH 0/2] iommu: Remove iommu_sva_ops::mm_exit()
jgg at ziepe.ca
Thu Apr 9 05:04:47 AEST 2020
On Wed, Apr 08, 2020 at 04:04:25PM +0200, Jean-Philippe Brucker wrote:
> The IOMMU SVA API currently requires device drivers to implement an
> mm_exit() callback, which stops device jobs that do DMA. This function
> is called in the release() MMU notifier, when an address space that is
> shared with a device exits.
> It has been noted several time during discussions about SVA that
> cancelling DMA jobs can be slow and complex, and doing it in the
> release() notifier might cause synchronization issues (patch 2 has more
> background). Device drivers must in any case call unbind() to remove
> their bond, after stopping DMA from a more favorable context (release of
> a file descriptor).
> So after mm exits, rather than notifying device drivers, we can hold on
> to the PASID until unbind(), ask IOMMU drivers to silently abort DMA and
> Page Requests in the meantime. This change should relieve the mmput()
At least all the patch comments look like they are on the right track
to me, thanks for doing this.
More information about the Linux-accelerators