summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorDavid Matlack <dmatlack@google.com>2025-11-26 23:17:21 +0000
committerAlex Williamson <alex@shazbot.org>2025-11-28 10:58:06 -0700
commitd8470a775ccd7e2c709482193cba0ae18d17c717 (patch)
tree267f8bedcc427a2f58139718dd7eb2a722b1215f /tools/lib/python
parentc9756b4d2702cc33748eed5916ddc159d349cba6 (diff)
vfio: selftests: Support multiple devices in the same container/iommufd
Support tests that want to add multiple devices to the same container/iommufd by decoupling struct vfio_pci_device from struct iommu. Multi-devices tests can now put multiple devices in the same container/iommufd like so: iommu = iommu_init(iommu_mode); device1 = vfio_pci_device_init(bdf1, iommu); device2 = vfio_pci_device_init(bdf2, iommu); device3 = vfio_pci_device_init(bdf3, iommu); ... vfio_pci_device_cleanup(device3); vfio_pci_device_cleanup(device2); vfio_pci_device_cleanup(device1); iommu_cleanup(iommu); To account for the new separation of vfio_pci_device and iommu, update existing tests to initialize and cleanup a struct iommu. 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-7-dmatlack@google.com Signed-off-by: Alex Williamson <alex@shazbot.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions