vfio: selftests: Keep track of DMA regions mapped into the device

Keep track of the list of DMA regions that are mapped into the device
using a linked list and a new struct vfio_dma_region and use that to add
{__,}to_iova() for converting host virtual addresses into IOVAs.

This will be used in a subsequent commit to map multiple DMA regions
into a device that are then used by drivers.

Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: David Matlack <dmatlack@google.com>
Link: https://lore.kernel.org/r/20250822212518.4156428-10-dmatlack@google.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
David Matlack 2025-08-22 21:24:56 +00:00 • committed by Alex Williamson
commit 346cd58f1f
3 changed files with 79 additions and 24 deletions