vfio: selftests: Add documentation
Subsystems (3)
David Matlack
maintainerPATCH 1/1 vfio: selftests: Add documentation
Add documentation for VFIO selftests in Documentation/driver-api/vfio-selftests.rst, include it in the driver-api index, and update MAINTAINERS.
VFIO selftests provide a userspace testing framework built on kselftest to exercise VFIO and IOMMUFD APIs with real physical PCI devices. Since VFIO selftests was introduced it has expanded to include helper libraries (libvfio), driver-level abstractions for triggering hardware DMA and interrupts, multiple IOMMU execution modes, dynamic IOVA allocation, and native integration into KVM selftests. Dedicated documentation should be helpful to guide kernel developers on writing tests, setting up devices, running tests, and understanding the helper library.
---
Note: The integration of libvfio into KVM selftests hasn't landed in vfio/next yet but Sean sent out the pull request to include it in 7.3 so I am optimistically including it in the documentation here.
Documentation/driver-api/index.rst | 1 + Documentation/driver-api/vfio-selftests.rst | 243 ++++++++++++++++++++ MAINTAINERS | 1 + 3 files changed, 245 insertions(+) create mode 100644 Documentation/driver-api/vfio-selftests.rst
Documentation/driver-api/index.rst +1 -0
@@ -47,6 +47,7 @@ of interest to most developers working on device drivers. vfio-mediated-device vfio vfio-pci-device-specific-driver-acceptance + vfio-selftests Bus-level documentation =======================
Documentation/driver-api/vfio-selftests.rst new file +243 -0
243 lines not on this page · raw message
MAINTAINERS +1 -0
@@ -28396,6 +28396,7 @@ VFIO SELFTESTS M: David Matlack <[email protected]> L: [email protected] S: Maintained +F: Documentation/driver-api/vfio-selftests.rst F: tools/testing/selftests/vfio/ VFIO VIRTIO PCI DRIVER
base-commit: 37ffa24c9d07edcd414d34283e02af3f3866cf12
Signature · 1 line
2.55.0.699.gb54405d56f-goog
Documentation/driver-api/vfio-selftests.rst line 206
Quoted 4 lines · On Tue, 18 Aug 2026 00:05:49 +0000 David Matlack <[email protected]> wrote:
Documentation/driver-api/vfio-selftests.rst new file +4
-0+By exercising DMA and interrupts across real, varied endpoints, tests can +thoroughly stress and validate the underlying kernel paths—such as IOMMU page +table management, dirty page tracking, Device TLB and IOTLB invalidations, and +interrupt delivery under authentic hardware conditions.
"...underlying kernel paths, such as..." I haven't met a human that actually uses em-dash and it renders poorly in ascii. Otherwise the doc looks great. I also realize I posted my most recent patches with the wrong subject prefix, I should have used "vfio: selftests:". We could maybe mention such a convention in this doc, but enforcement is largely manual, and often an afterthought for me. Thanks,
Alex