summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/vfio/lib/include
diff options
context:
space:
mode:
authorJosh Hilke <jrhilke@google.com>2025-08-22 21:24:53 +0000
committerAlex Williamson <alex.williamson@redhat.com>2025-08-27 12:14:03 -0600
commita0fd0af504f7fe11e2f87e48a1924d7e7f5a0590 (patch)
tree4bd9575a10c419c45d418d64188f7e43a43f0c98 /tools/testing/selftests/vfio/lib/include
parentb477e7bcd25ecb4da91bb52d5f980611cc77d543 (diff)
vfio: selftests: Add test to reset vfio device.
Add a test to vfio_pci_device_test which resets the device. If reset is not supported by the device, the test is skipped. Signed-off-by: Josh Hilke <jrhilke@google.com> Acked-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: David Matlack <dmatlack@google.com> Link: https://lore.kernel.org/r/20250822212518.4156428-7-dmatlack@google.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'tools/testing/selftests/vfio/lib/include')
-rw-r--r--tools/testing/selftests/vfio/lib/include/vfio_util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/vfio/lib/include/vfio_util.h b/tools/testing/selftests/vfio/lib/include/vfio_util.h
index b7d2bb8c18ba..234403b442af 100644
--- a/tools/testing/selftests/vfio/lib/include/vfio_util.h
+++ b/tools/testing/selftests/vfio/lib/include/vfio_util.h
@@ -83,6 +83,7 @@ const char *vfio_selftests_get_bdf(int *argc, char *argv[]);
struct vfio_pci_device *vfio_pci_device_init(const char *bdf, int iommu_type);
void vfio_pci_device_cleanup(struct vfio_pci_device *device);
+void vfio_pci_device_reset(struct vfio_pci_device *device);
void vfio_pci_dma_map(struct vfio_pci_device *device, u64 iova, u64 size,
void *vaddr);