vfio/type1: massage unmap iteration
authorSteve Sistare <steven.sistare@oracle.com>
Fri, 29 Jan 2021 16:54:08 +0000 (08:54 -0800)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 1 Feb 2021 20:20:06 +0000 (13:20 -0700)
commit40ae9b807b89e60f86a40f33b931e6cde7eed2b7
tree0a7abe3866b7872ac4a01fe47fefac3ff7d7929b
parent441e8106a238920f28e2e79cff462044551f60e2
vfio/type1: massage unmap iteration

Modify the iteration in vfio_dma_do_unmap so it does not depend on deletion
of each dma entry.  Add a variant of vfio_find_dma that returns the entry
with the lowest iova in the search range to initialize the iteration.  No
externally visible change, but this behavior is needed in the subsequent
update-vaddr patch.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/vfio_iommu_type1.c