]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
vfio: selftests: Add tests to validate SR-IOV UAPI
authorRaghavendra Rao Ananta <rananta@google.com>
Tue, 5 May 2026 21:28:38 +0000 (21:28 +0000)
committerAlex Williamson <alex@shazbot.org>
Wed, 20 May 2026 17:54:10 +0000 (11:54 -0600)
commita6e4e726600df4ed28b06892c76fb2dd5a5de2e9
treecd4e54e30cf60031ecf69389ed5e208f8ddd6b61
parent3152e7f457dece42b13423c45a371ee686074fac
vfio: selftests: Add tests to validate SR-IOV UAPI

Add a selftest, vfio_pci_sriov_uapi_test.c, to validate the
SR-IOV UAPI, including the following cases, iterating over
all the IOMMU modes currently supported:
 - Setting correct/incorrect/NULL tokens during device init.
 - Close the PF device immediately after setting the token.
 - Change/override the PF's token after device init.

Signed-off-by: Raghavendra Rao Ananta <rananta@google.com>
Reviewed-by: Vipin Sharma <vipinsh@google.com>
Reviewed-by: David Matlack <dmatlack@google.com>
Tested-by: David Matlack <dmatlack@google.com>
Link: https://lore.kernel.org/r/20260505212838.1698034-9-rananta@google.com
Signed-off-by: Alex Williamson <alex@shazbot.org>
tools/testing/selftests/vfio/Makefile
tools/testing/selftests/vfio/vfio_pci_sriov_uapi_test.c [new file with mode: 0644]