<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/testing/selftests/vfio/Makefile, branch linux-rolling-lts</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-lts</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-lts'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-08-27T18:14:11Z</updated>
<entry>
<title>vfio: selftests: Add a script to help with running VFIO selftests</title>
<updated>2025-08-27T18:14:11Z</updated>
<author>
<name>David Matlack</name>
</author>
<published>2025-08-22T21:25:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fd134b0f2f8ef9b1b7b0cade8cac4ff831619713'/>
<id>urn:sha1:fd134b0f2f8ef9b1b7b0cade8cac4ff831619713</id>
<content type='text'>
Introduce run.sh, a script to help with running VFIO selftests. The
script is intended to be used for both humans manually running VFIO
selftests, and to incorporate into test automation where VFIO selftests
may run alongside other tests. As such the script aims to be hermetic,
returning the system to the state it was before the test started.

The script takes as input the BDF of a device to use and a command to
run (typically the command would be a VFIO selftest). e.g.

  $ ./run.sh -d 0000:6a:01.0 ./vfio_pci_device_test

 or

  $ ./run.sh -d 0000:6a:01.0 -- ./vfio_pci_device_test

The script then handles unbinding device 0000:6a:01.0 from its current
driver, binding it to vfio-pci, running the test, unbinding from
vfio-pci, and binding back to the original driver.

When run.sh runs the provided test, it does so by appending the BDF as
the last parameter. For example:

  $ ./run.sh -d 0000:6a:01.0 -- echo hello

Results in the following being printed to stdout:

  hello 0000:6a:01.0

The script also supports a mode where it can break out into a shell so
that multiple tests can be run manually.

  $ ./run.sh -d 0000:6a:01.0 -s
  $ echo $VFIO_SELFTESTS_BDF
  $ ./vfio_pci_device_test
  $ exit

Choosing which device to use is up to the user.

In the future this script should be extensible to tests that want to use
multiple devices. The script can support accepting -d BDF multiple times
and parse them into an array, setup all the devices, pass the list of
BDFs to the test, and then cleanup all the devices.

Acked-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: David Matlack &lt;dmatlack@google.com&gt;
Link: https://lore.kernel.org/r/20250822212518.4156428-31-dmatlack@google.com
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio: sefltests: Add vfio_pci_driver_test</title>
<updated>2025-08-27T18:14:05Z</updated>
<author>
<name>David Matlack</name>
</author>
<published>2025-08-22T21:25:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fded8da4bc38df6e1475ac5998934c490b96215d'/>
<id>urn:sha1:fded8da4bc38df6e1475ac5998934c490b96215d</id>
<content type='text'>
Add a new selftest that tests all driver operations. This test serves
both as a demonstration of the driver framework, and also as a
correctness test for future drivers.

Acked-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: David Matlack &lt;dmatlack@google.com&gt;
Link: https://lore.kernel.org/r/20250822212518.4156428-14-dmatlack@google.com
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio: selftests: Move vfio dma mapping test to their own file</title>
<updated>2025-08-27T18:14:02Z</updated>
<author>
<name>Josh Hilke</name>
</author>
<published>2025-08-22T21:24:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b477e7bcd25ecb4da91bb52d5f980611cc77d543'/>
<id>urn:sha1:b477e7bcd25ecb4da91bb52d5f980611cc77d543</id>
<content type='text'>
Move the dma_map_unmap test from vfio_pci_device_test to a new test:
vfio_dma_mapping_test. We are going to add more complex dma mapping
tests, so it makes sense to separate this from the vfio pci device
test which is more of a sanity check for vfio pci functionality.

Signed-off-by: Josh Hilke &lt;jrhilke@google.com&gt;
Acked-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: David Matlack &lt;dmatlack@google.com&gt;
Link: https://lore.kernel.org/r/20250822212518.4156428-6-dmatlack@google.com
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio: selftests: Test basic VFIO and IOMMUFD integration</title>
<updated>2025-08-27T18:14:02Z</updated>
<author>
<name>Josh Hilke</name>
</author>
<published>2025-08-22T21:24:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=790588f06e9ce58c281faeada453f47361bc06b6'/>
<id>urn:sha1:790588f06e9ce58c281faeada453f47361bc06b6</id>
<content type='text'>
Add a vfio test suite which verifies that userspace can bind and unbind
devices, allocate I/O address space, and attach a device to an IOMMU
domain using the cdev + IOMMUfd VFIO interface.

Signed-off-by: Josh Hilke &lt;jrhilke@google.com&gt;
Acked-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: David Matlack &lt;dmatlack@google.com&gt;
Link: https://lore.kernel.org/r/20250822212518.4156428-5-dmatlack@google.com
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio: selftests: Introduce vfio_pci_device_test</title>
<updated>2025-08-27T18:14:02Z</updated>
<author>
<name>David Matlack</name>
</author>
<published>2025-08-22T21:24:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=16eadd7c1277284cfff5b7071910920a2d008251'/>
<id>urn:sha1:16eadd7c1277284cfff5b7071910920a2d008251</id>
<content type='text'>
Introduce a basic VFIO selftest called vfio_pci_device_test to
demonstrate the functionality of the VFIO selftest library and provide
some test coverage of basic VFIO operations, including:

 - Mapping and unmapping DMA
 - Mapping and unmapping BARs
 - Enabling, triggering, and disabling MSI and MSI-x
 - Reading and writing to PCI config space

This test should work with most PCI devices, as long as they are bound
to vfio-pci.

Acked-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: David Matlack &lt;dmatlack@google.com&gt;
Link: https://lore.kernel.org/r/20250822212518.4156428-4-dmatlack@google.com
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio: selftests: Add a helper library for VFIO selftests</title>
<updated>2025-08-27T18:14:01Z</updated>
<author>
<name>David Matlack</name>
</author>
<published>2025-08-22T21:24:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=19faf6fd969c21589b6dd40c35255e4d00d427f8'/>
<id>urn:sha1:19faf6fd969c21589b6dd40c35255e4d00d427f8</id>
<content type='text'>
Add a basic helper library to be used by VFIO selftests.

The basic unit of the library is struct vfio_pci_device, which
represents a single PCI device that is bound to the vfio-pci driver. The
library currently only supports a single device per group and container,
and VFIO IOMMU types.

The code in this library was heavily based on prior work done by
Raghavendra Rao Ananta &lt;rananta@google.com&gt;, and the VFIO_ASSERT*()
macros were written by Vipin Sharma &lt;vipinsh@google.com&gt;.

Separate that Makefile rules for building the library into a separate
script so that the library can be built by and linked into KVM selftests
in a subsequent commit.

Acked-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: David Matlack &lt;dmatlack@google.com&gt;
Link: https://lore.kernel.org/r/20250822212518.4156428-3-dmatlack@google.com
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>selftests: Create tools/testing/selftests/vfio</title>
<updated>2025-08-27T18:14:01Z</updated>
<author>
<name>David Matlack</name>
</author>
<published>2025-08-22T21:24:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=292e9ee22b0adad49c9a6f63708988e32c007da6'/>
<id>urn:sha1:292e9ee22b0adad49c9a6f63708988e32c007da6</id>
<content type='text'>
Create the directory tools/testing/selftests/vfio with a stub Makefile
and hook it up to the top-level selftests Makefile.

This directory will be used in subsequent commits to host selftests for
the VFIO subsystem.

Acked-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: David Matlack &lt;dmatlack@google.com&gt;
Link: https://lore.kernel.org/r/20250822212518.4156428-2-dmatlack@google.com
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
</feed>
