]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
vfio: selftests: Keep track of DMA regions mapped into the device
authorDavid Matlack <dmatlack@google.com>
Fri, 22 Aug 2025 21:24:56 +0000 (21:24 +0000)
committerAlex Williamson <alex.williamson@redhat.com>
Wed, 27 Aug 2025 18:14:04 +0000 (12:14 -0600)
commit346cd58f1fb588f8ff193d76cf0bb455446ace03
treee48642ee2f6af4e0f7e8d1fe238994655dc1b6f2
parent47f861048ef7034a59431020c5916a43378a8c0c
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>
tools/testing/selftests/vfio/lib/include/vfio_util.h
tools/testing/selftests/vfio/lib/vfio_pci_device.c
tools/testing/selftests/vfio/vfio_dma_mapping_test.c