<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux.git/tools/testing/selftests/vfio, branch master</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/'/>
<updated>2026-08-10T19:24:40+00:00</updated>
<entry>
<title>vfio: selftests: Retry on EAGAIN during device reset</title>
<updated>2026-08-10T19:24:40+00:00</updated>
<author>
<name>Josh Hilke</name>
<email>jrhilke@google.com</email>
</author>
<published>2026-08-05T00:21:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=28ca5f67e1a79f62ed7988674fb07a8fc9eab8d2'/>
<id>urn:sha1:28ca5f67e1a79f62ed7988674fb07a8fc9eab8d2</id>
<content type='text'>
Add retry logic to vfio_pci_device_reset() to handle the case where PCI
resets fail due to lock contention, in which case
pci_try_reset_function() returns -EAGAIN.

Suggested-by: David Matlack &lt;dmatlack@google.com&gt;
Signed-off-by: Josh Hilke &lt;jrhilke@google.com&gt;
Acked-by: David Matlack &lt;dmatlack@google.com&gt;
Link: https://lore.kernel.org/r/20260805-igb_v3_b4-v10-3-9c86dc849c0d@google.com
Signed-off-by: Alex Williamson &lt;alex@shazbot.org&gt;
</content>
</entry>
<entry>
<title>vfio: selftests: igb: Add driver for Intel 82576 device</title>
<updated>2026-08-10T19:24:40+00:00</updated>
<author>
<name>Josh Hilke</name>
<email>jrhilke@google.com</email>
</author>
<published>2026-08-05T00:20:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=1583ef1175ba533e326dfeff6d8b9f3aaf761225'/>
<id>urn:sha1:1583ef1175ba533e326dfeff6d8b9f3aaf761225</id>
<content type='text'>
Add a VFIO selftest driver for the Intel Gigabit Ethernet controller
(IGB), specifically targeting the 82576 device. IGB is fully virtualized
in QEMU which makes it easy to run VFIO selftests without needing any
specific hardware.

Since IGB is an Ethernet device, it cannot support DMA transfers smaller
than the minimum Ethernet payload size (60 bytes) without hardware padding
corrupting adjacent memory. The driver asserts that the transfer size is
at least 60 bytes to prevent this.

All VFIO selftest drivers must implement DMA/memcpy operations, but IGB
doesn't have a native memcpy feature, so the loopback feature (described
in section 3.5.6.3 of IGB specification) is used to implement it. To
support testing on both QEMU and physical hardware, the driver uses PHY
internal loopback with some QEMU-specific fallbacks. The driver also
supports MSI-X routing and interrupt management, and disables PCIe
completion timeout retries to ensure clean recovery during invalid-DMA
tests.

Users can verify the driver works in QEMU by building the kernel,
building VFIO selftests, and then running the vfio_pci_driver_test using
this command:

vng \
--run arch/x86/boot/bzImage \
--user root \
--disable-microvm \
--memory 32G \
--cpus 8 \
--qemu-opts="-M q35,accel=kvm,kernel-irqchip=split" \
--qemu-opts="-device intel-iommu,intremap=on,caching-mode=on,device-iotlb=on" \
--qemu-opts="-netdev user,id=net0 -device igb,netdev=net0,addr=09.0" \
--append "console=ttyS0 earlyprintk=ttyS0 intel_iommu=on iommu=pt" \
--exec "modprobe vfio-pci &amp;&amp; \
  ./tools/testing/selftests/vfio/scripts/setup.sh 0000:00:09.0 &amp;&amp; \
  ./tools/testing/selftests/vfio/scripts/run.sh ./tools/testing/selftests/vfio/vfio_pci_driver_test"

Assisted-by: Claude:claude-opus-4-7
Assisted-by: Gemini:gemini-3.1-pro-preview
Co-developed-by: Alex Williamson &lt;alex.williamson@nvidia.com&gt;
Signed-off-by: Alex Williamson &lt;alex.williamson@nvidia.com&gt;
Signed-off-by: Josh Hilke &lt;jrhilke@google.com&gt;
Acked-by: David Matlack &lt;dmatlack@google.com&gt;
Link: https://lore.kernel.org/r/20260805-igb_v3_b4-v10-2-9c86dc849c0d@google.com
Signed-off-by: Alex Williamson &lt;alex@shazbot.org&gt;
</content>
</entry>
<entry>
<title>vfio: selftests: Add helpers to re-enable interrupts</title>
<updated>2026-08-10T19:24:40+00:00</updated>
<author>
<name>Alex Williamson</name>
<email>alex.williamson@nvidia.com</email>
</author>
<published>2026-08-05T00:20:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=aabaf84560e0737eeba0927395d04a813cbec8c0'/>
<id>urn:sha1:aabaf84560e0737eeba0927395d04a813cbec8c0</id>
<content type='text'>
Selftest drivers that recover from a fault by issuing VFIO_DEVICE_RESET
need to re-arm device interrupts afterwards.  VFIO_DEVICE_RESET tears
down the kernel-side IRQ trigger so a subsequent VFIO_DEVICE_SET_IRQS
is required, but the user-side eventfds (and any fd cached in a test
fixture) are still valid and must be preserved.

vfio_pci_irq_enable() refuses to be called for vectors that already
have an eventfd (VFIO_ASSERT_LT), and vfio_pci_irq_disable() closes
all eventfds before resetting the trigger, so neither is suitable.

Add vfio_pci_irq_reenable(device, index, vector, count) which asserts
that the requested range has existing eventfds and re-issues
VFIO_DEVICE_SET_IRQS using them.  Signature mirrors vfio_pci_irq_enable().

Add vfio_pci_msi{,x}_reenable() wrappers around vfio_pci_irq_reenable()
for additional ease of use and readability.

Assisted-by: Claude:claude-opus-4-7
Signed-off-by: Alex Williamson &lt;alex.williamson@nvidia.com&gt;
Reviewed-by: David Matlack &lt;dmatlack@google.com&gt;
Acked-by: David Matlack &lt;dmatlack@google.com&gt;
Link: https://lore.kernel.org/r/20260805-igb_v3_b4-v10-1-9c86dc849c0d@google.com
Signed-off-by: Alex Williamson &lt;alex@shazbot.org&gt;
</content>
</entry>
<entry>
<title>vfio: selftests: Avoid VLAs</title>
<updated>2026-07-17T14:39:35+00:00</updated>
<author>
<name>Alex Mastro</name>
<email>amastro@fb.com</email>
</author>
<published>2026-06-17T18:58:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6bc73befe1b4143ebe6a991b2ab133e9f3087128'/>
<id>urn:sha1:6bc73befe1b4143ebe6a991b2ab133e9f3087128</id>
<content type='text'>
Allocate VFIO ioctl requests dynamically instead of using VLAs. GCC 11.5.0
rejects initialized VLAs with:

  error: variable-sized object may not be initialized

The replaced stack u8 arrays also do not guarantee native struct alignment
for the aliased pointers.

Fixes: 19faf6fd969c ("vfio: selftests: Add a helper library for VFIO selftests")
Fixes: 20face8c75ff ("vfio: selftests: Add helper to set/override a vf_token")
Assisted-by: Codex:gpt-5.5-high
Reviewed-by: Vipin Sharma &lt;vipinsh@google.com&gt;
Reviewed-by: David Matlack &lt;dmatlack@google.com&gt;
Signed-off-by: Alex Mastro &lt;amastro@fb.com&gt;
Link: https://lore.kernel.org/r/20260617-scratch-amastro-vfio-selftests-avoid-vlas-v4-2-b9f52f1e2c5a@fb.com
Signed-off-by: Alex Williamson &lt;alex@shazbot.org&gt;
</content>
</entry>
<entry>
<title>vfio: selftests: Add allocation assert helpers</title>
<updated>2026-07-17T14:39:35+00:00</updated>
<author>
<name>Alex Mastro</name>
<email>amastro@fb.com</email>
</author>
<published>2026-06-17T18:58:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=bc4be8c6fd8bf9f4d7febccfbd6441c4d708135a'/>
<id>urn:sha1:bc4be8c6fd8bf9f4d7febccfbd6441c4d708135a</id>
<content type='text'>
Add {malloc,calloc}_assert() helpers alongside the existing *_assert()
helpers.

Use them for VFIO selftest allocations that immediately assert a
non-NULL result.

Assisted-by: Codex:gpt-5.5-high
Signed-off-by: Alex Mastro &lt;amastro@fb.com&gt;
Reviewed-by: David Matlack &lt;dmatlack@google.com&gt;
Link: https://lore.kernel.org/r/20260617-scratch-amastro-vfio-selftests-avoid-vlas-v4-1-b9f52f1e2c5a@fb.com
Signed-off-by: Alex Williamson &lt;alex@shazbot.org&gt;
</content>
</entry>
<entry>
<title>vfio: selftests: Add NVIDIA Falcon driver for DMA testing</title>
<updated>2026-07-17T14:39:35+00:00</updated>
<author>
<name>Rubin Du</name>
<email>rubind@nvidia.com</email>
</author>
<published>2026-06-09T23:28:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=27fffdfba335ee980b6ceb34180d5048faf67090'/>
<id>urn:sha1:27fffdfba335ee980b6ceb34180d5048faf67090</id>
<content type='text'>
Add a new VFIO PCI driver for NVIDIA GPUs that enables DMA testing
via the Falcon (Fast Logic Controller) microcontrollers. This driver
extracts and adapts the DMA test functionality from NVIDIA's
gpu-admin-tools project and integrates it into the existing VFIO
selftest framework.

Falcons are general-purpose microcontrollers present on NVIDIA GPUs
that can perform DMA operations between system memory and device
memory. By leveraging Falcon DMA, this driver allows NVIDIA GPUs to
be tested alongside Intel IOAT and DSA devices using the same
selftest infrastructure.

The driver is named 'nv_falcon' to reflect that it specifically
controls the Falcon microcontrollers for DMA operations, rather
than exposing general GPU functionality.

Reference implementation:
https://github.com/NVIDIA/gpu-admin-tools

Signed-off-by: Alex Williamson &lt;alex.williamson@nvidia.com&gt;
Signed-off-by: Rubin Du &lt;rubind@nvidia.com&gt;
Acked-by: David Matlack &lt;dmatlack@google.com&gt;
Link: https://lore.kernel.org/r/20260609232855.3808971-5-rubind@nvidia.com
Signed-off-by: Alex Williamson &lt;alex@shazbot.org&gt;
</content>
</entry>
<entry>
<title>vfio: selftests: Allow drivers without send_msi() support</title>
<updated>2026-07-17T14:39:34+00:00</updated>
<author>
<name>Rubin Du</name>
<email>rubind@nvidia.com</email>
</author>
<published>2026-06-09T23:28:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=159f1b216447f58e3eaf05d46239fc2458289c25'/>
<id>urn:sha1:159f1b216447f58e3eaf05d46239fc2458289c25</id>
<content type='text'>
Allow drivers that cannot trigger MSI interrupts to leave the send_msi
callback NULL. Add an fcntl_set_msi_nonblock() wrapper that only sets
nonblocking mode when send_msi is available, and update ASSERT_NO_MSI()
to skip when the driver lacks MSI support. The send_msi test SKIPs and
mix_and_match skips the MSI portion per iteration.

Reviewed-by: David Matlack &lt;dmatlack@google.com&gt;
Signed-off-by: Alex Williamson &lt;alex.williamson@nvidia.com&gt;
Signed-off-by: Rubin Du &lt;rubind@nvidia.com&gt;
Link: https://lore.kernel.org/r/20260609232855.3808971-4-rubind@nvidia.com
Signed-off-by: Alex Williamson &lt;alex@shazbot.org&gt;
</content>
</entry>
<entry>
<title>vfio: selftests: Add generic PCI command register helpers</title>
<updated>2026-07-17T14:39:34+00:00</updated>
<author>
<name>Rubin Du</name>
<email>rubind@nvidia.com</email>
</author>
<published>2026-06-09T23:28:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=984b43b203c43ff7ab11dd92c04a5b29eb80389b'/>
<id>urn:sha1:984b43b203c43ff7ab11dd92c04a5b29eb80389b</id>
<content type='text'>
Add vfio_pci_cmd_set()/vfio_pci_cmd_clear() read-modify-write macros
for PCI_COMMAND in vfio_pci_device.h.

Reviewed-by: David Matlack &lt;dmatlack@google.com&gt;
Signed-off-by: Alex Williamson &lt;alex.williamson@nvidia.com&gt;
Signed-off-by: Rubin Du &lt;rubind@nvidia.com&gt;
Link: https://lore.kernel.org/r/20260609232855.3808971-3-rubind@nvidia.com
Signed-off-by: Alex Williamson &lt;alex@shazbot.org&gt;
</content>
</entry>
<entry>
<title>vfio: selftests: Add memcpy chunking to vfio_pci_driver_memcpy()</title>
<updated>2026-07-17T14:39:34+00:00</updated>
<author>
<name>Rubin Du</name>
<email>rubind@nvidia.com</email>
</author>
<published>2026-06-09T23:28:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=df34ecc52526480a1a4bb78bc75bfb009c6076a4'/>
<id>urn:sha1:df34ecc52526480a1a4bb78bc75bfb009c6076a4</id>
<content type='text'>
Add a chunking loop to vfio_pci_driver_memcpy() so that it breaks up
large memcpy requests into max_memcpy_size-sized chunks. This allows
callers to request any size without worrying about per-driver limits.
The memcpy_start()/memcpy_wait() semantics are unchanged.

Update the test to use 4x max_memcpy_size so it exercises the new
chunking path (4 iterations) while keeping execution fast for drivers
with small DMA transfer sizes.

Reviewed-by: David Matlack &lt;dmatlack@google.com&gt;
Signed-off-by: Alex Williamson &lt;alex.williamson@nvidia.com&gt;
Signed-off-by: Rubin Du &lt;rubind@nvidia.com&gt;
Link: https://lore.kernel.org/r/20260609232855.3808971-2-rubind@nvidia.com
Signed-off-by: Alex Williamson &lt;alex@shazbot.org&gt;
</content>
</entry>
<entry>
<title>vfio: selftests: Add luuid to libvfio.mk's list of libraries, not to the Makefile</title>
<updated>2026-06-30T21:50:55+00:00</updated>
<author>
<name>Sean Christopherson</name>
<email>seanjc@google.com</email>
</author>
<published>2026-06-30T21:28:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e242e974e812e7a47e3088860c80d9492fac314f'/>
<id>urn:sha1:e242e974e812e7a47e3088860c80d9492fac314f</id>
<content type='text'>
Link to the uuid library as part of libvfio.mk instead of as only linking
it via VFIO selftests' Makefile, as the whole point of providing libvfio.mk
is to allow linking the VFIO library functionality into KVM selftests,
without KVM selftests having to know the gory details or duplicate code.

Cc: Raghavendra Rao Ananta &lt;rananta@google.com&gt;
Cc: David Matlack &lt;dmatlack@google.com&gt;
Cc: Vipin Sharma &lt;vipinsh@google.com&gt;
Cc: Alex Williamson &lt;alex@shazbot.org&gt;
Fixes: e65f1bf8a2db ("vfio: selftests: Extend container/iommufd setup for passing vf_token")
Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
Reviewed-by: David Matlack &lt;dmatlack@google.com&gt;
Link: https://lore.kernel.org/r/20260630212805.474418-1-seanjc@google.com
Signed-off-by: Alex Williamson &lt;alex@shazbot.org&gt;
</content>
</entry>
</feed>
