]> git.baikalelectronics.ru Git - kernel.git/commit
vfio: Replace the iommu notifier with a device list
authorJason Gunthorpe <jgg@nvidia.com>
Wed, 20 Jul 2022 00:02:49 +0000 (21:02 -0300)
committerAlex Williamson <alex.williamson@redhat.com>
Wed, 20 Jul 2022 17:57:59 +0000 (11:57 -0600)
commit28cfeb0b45fd6ba85b74182f05f679435ac25758
treef35b0994df95af7405e122e09256dae362586137
parente7f5d9a5c682493bfff37dda52bd509abef91c2b
vfio: Replace the iommu notifier with a device list

Instead of bouncing the function call to the driver op through a blocking
notifier just have the iommu layer call it directly.

Register each device that is being attached to the iommu with the lower
driver which then threads them on a linked list and calls the appropriate
driver op at the right time.

Currently the only use is if dma_unmap() is defined.

Also, fully lock all the debugging tests on the pinning path that a
dma_unmap is registered.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/2-v4-681e038e30fd+78-vfio_unmap_notif_jgg@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/vfio.c
drivers/vfio/vfio.h
drivers/vfio/vfio_iommu_type1.c
include/linux/vfio.h