iommu/virtio: Make use of ops->iotlb_sync_map
authorNiklas Schnelle <schnelle@linux.ibm.com>
Mon, 20 Nov 2023 14:51:56 +0000 (15:51 +0100)
committerJoerg Roedel <jroedel@suse.de>
Mon, 27 Nov 2023 10:00:42 +0000 (11:00 +0100)
commit00271ca5cbcd36d01f3c58a05378304ba9dd6a2a
tree3b1998a4128c72d1a2e7d1a30489d1bd76a0323a
parent2cc14f52aeb78ce3f29677c2de1f06c0e91471ab
iommu/virtio: Make use of ops->iotlb_sync_map

Pull out the sync operation from viommu_map_pages() by implementing
ops->iotlb_sync_map. This allows the common IOMMU code to map multiple
elements of an sg with a single sync (see iommu_map_sg()).

Link: https://lore.kernel.org/lkml/20230726111433.1105665-1-schnelle@linux.ibm.com/
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Link: https://lore.kernel.org/r/20231120-viommu-sync-map-v3-1-50a57ecf78b5@linux.ibm.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/virtio-iommu.c