diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2022-07-19 21:02:48 -0300 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2022-07-20 11:57:59 -0600 |
commit | ce4b4657ff18925c315855aa290e93c5fa652d96 (patch) | |
tree | 0d477801e16d534577d08b2a76cb969896e521f1 /drivers/vfio/vfio.h | |
parent | 2a8ed7ef00b939fbcc98b948f780bd03bafed227 (diff) |
vfio: Replace the DMA unmapping notifier with a callback
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 <hch@lst.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Tony Krowiak <akrowiak@linux.ibm.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/1-v4-681e038e30fd+78-vfio_unmap_notif_jgg@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/vfio/vfio.h')
-rw-r--r-- | drivers/vfio/vfio.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/vfio/vfio.h b/drivers/vfio/vfio.h index a67130221151..25da02ca1568 100644 --- a/drivers/vfio/vfio.h +++ b/drivers/vfio/vfio.h @@ -33,6 +33,9 @@ enum vfio_iommu_notify_type { VFIO_IOMMU_CONTAINER_CLOSE = 0, }; +/* events for register_notifier() */ +#define VFIO_IOMMU_NOTIFY_DMA_UNMAP BIT(0) + /** * struct vfio_iommu_driver_ops - VFIO IOMMU driver callbacks */ |