]> Gentwo Git Trees - linux/.git/commit
vfio: selftests: Move IOVA allocator into iova_allocator.c
authorDavid Matlack <dmatlack@google.com>
Wed, 26 Nov 2025 23:17:27 +0000 (23:17 +0000)
committerAlex Williamson <alex@shazbot.org>
Fri, 28 Nov 2025 17:58:06 +0000 (10:58 -0700)
commit2607a4361312bf407931597423fe23db406ca8d3
tree97819f76251f642cb8e59789951392fabb89c48c
parent2aca571089b2cc333ed5ad0ada4902aa6f7c0d3c
vfio: selftests: Move IOVA allocator into iova_allocator.c

Move the IOVA allocator into its own file, to provide better separation
between the allocator and the struct vfio_pci_device helper code.

The allocator could go into iommu.c, but it is standalone enough that a
separate file seems cleaner. This also continues the trend of having a
.c for every major object in VFIO selftests (vfio_pci_device.c,
vfio_pci_driver.c, iommu.c, and now iova_allocator.c).

No functional change intended.

Reviewed-by: Alex Mastro <amastro@fb.com>
Tested-by: Alex Mastro <amastro@fb.com>
Reviewed-by: Raghavendra Rao Ananta <rananta@google.com>
Signed-off-by: David Matlack <dmatlack@google.com>
Link: https://lore.kernel.org/r/20251126231733.3302983-13-dmatlack@google.com
Signed-off-by: Alex Williamson <alex@shazbot.org>
tools/testing/selftests/vfio/lib/iova_allocator.c [new file with mode: 0644]
tools/testing/selftests/vfio/lib/libvfio.mk
tools/testing/selftests/vfio/lib/vfio_pci_device.c