From: Josh Hilke <jrhilke@google.com>
To: Alex Williamson <alex@shazbot.org>, David Matlack <dmatlack@google.com>
Cc: Vipin Sharma <vipinsh@google.com>, Shuah Khan <shuah@kernel.org>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org, Josh Hilke <jrhilke@google.com>
Subject: [PATCH v2 00/10] selftests/vfio: igb: Add driver for Intel
Date: Tue, 26 May 2026 23:54:07 +0000 [thread overview]
Message-ID: <20260526235417.2058313-1-jrhilke@google.com> (raw)
This is v2 of a series which adds VFIO selftest driver for the Intel
82576 Ethernet Gigabit Controller (IGB). This device is emulated in QEMU
and is also ubiquitous on many systems which makes it a good candidate
device for running VFIO selftests.
v1: https://lore.kernel.org/kvm/20260511211839.2781731-1-jrhilke@google.com/
Major changes in v2
===================
1. Patches 2 through 9 add Alex Williamson's series which adds support
for the physical device since v1 only supported the QEMU-emulated
device.
https://lore.kernel.org/kvm/20260515220330.565792-1-alex.williamson@nvidia.com/
2. Patch 10 adds the official IGB header files to the driver, which
eliminates duplicate register definitions.
Testing
=======
- VFIO selftests builds clean at every commit
- vfio_pci_driver_test passes using IGB driver + QEMU. Use the following
VNG command to run the tests:
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 && \
./tools/testing/selftests/vfio/scripts/setup.sh 0000:00:09.0 && \
./tools/testing/selftests/vfio/scripts/run.sh ./tools/testing/selftests/vfio/vfio_pci_driver_test"
Future work
===========
Modify QEMU's implementation of IGB loopback data transfer to be
asynchronous. Alex noted that QEMU's emulation of transmitting data in
loopback mode is synchronous, i.e by the time memcpy_start() returns,
the data is already in the Rx queue. This won't work for testing
continuous DMA (memcpy) across Live Update + kexec.
One solution is to simulate the line rate in QEMU. This would allow us
to slow down the rate of DMA, so that it continues for the duration of
Live Update.
Assistance
==========
- Claude Opus 4.7 with additional assistance from GPT 5.5 for Alex's
patches
- Gemini 3.1 Pro Preview for my patches
--------
Changelog:
v1 -> v2
- Removed the chunking loop in igb_memcpy_start() (David)
- Removed redundant writes to status_error and hdr_addr (David)
- Include official IGB header files (David)
Alex Williamson (8):
selftests/vfio: igb: Use PHY internal loopback on 82576
selftests/vfio: igb: Use advanced TX and RX descriptors
selftests/vfio: igb: Program MSI-X interrupt routing
selftests/vfio: igb: Extend memcpy completion timeout for line-rate
hardware
selftests/vfio: igb: Disable PCIe completion timeout retries
selftests/vfio: Add vfio_pci_irq_reenable() helper
selftests/vfio: igb: Factor hardware programming into igb_hw_init()
selftests/vfio: igb: Recover after DMA-read faults
Josh Hilke (2):
selftests/vfio: igb: Add driver for IGB QEMU device
selftests/vfio: igb: Use offical IGB headers in selftest driver
.../selftests/vfio/lib/drivers/igb/igb.c | 524 ++++++++++++++++++
.../lib/include/libvfio/vfio_pci_device.h | 2 +
tools/testing/selftests/vfio/lib/libvfio.mk | 2 +
.../selftests/vfio/lib/vfio_pci_device.c | 22 +
.../selftests/vfio/lib/vfio_pci_driver.c | 2 +
5 files changed, 552 insertions(+)
create mode 100644 tools/testing/selftests/vfio/lib/drivers/igb/igb.c
--
2.54.0.794.g4f17f83d09-goog
next reply other threads:[~2026-05-26 23:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-26 23:54 Josh Hilke [this message]
2026-05-26 23:54 ` [PATCH v2 01/10] selftests/vfio: igb: Add driver for IGB QEMU device Josh Hilke
2026-05-26 23:54 ` [PATCH v2 02/10] selftests/vfio: igb: Use PHY internal loopback on 82576 Josh Hilke
2026-05-26 23:54 ` [PATCH v2 03/10] selftests/vfio: igb: Use advanced TX and RX descriptors Josh Hilke
2026-05-26 23:54 ` [PATCH v2 04/10] selftests/vfio: igb: Program MSI-X interrupt routing Josh Hilke
2026-05-26 23:54 ` [PATCH v2 05/10] selftests/vfio: igb: Extend memcpy completion timeout for line-rate hardware Josh Hilke
2026-05-26 23:54 ` [PATCH v2 06/10] selftests/vfio: igb: Disable PCIe completion timeout retries Josh Hilke
2026-05-26 23:54 ` [PATCH v2 07/10] selftests/vfio: Add vfio_pci_irq_reenable() helper Josh Hilke
2026-07-06 21:03 ` David Matlack
2026-05-26 23:54 ` [PATCH v2 08/10] selftests/vfio: igb: Factor hardware programming into igb_hw_init() Josh Hilke
2026-07-06 21:16 ` David Matlack
2026-05-26 23:54 ` [PATCH v2 09/10] selftests/vfio: igb: Recover after DMA-read faults Josh Hilke
2026-07-06 21:16 ` David Matlack
2026-05-26 23:54 ` [PATCH v2 10/10] selftests/vfio: igb: Use offical IGB headers in selftest driver Josh Hilke
2026-07-06 20:49 ` David Matlack
2026-07-06 20:55 ` [PATCH v2 00/10] selftests/vfio: igb: Add driver for Intel David Matlack
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260526235417.2058313-1-jrhilke@google.com \
--to=jrhilke@google.com \
--cc=alex@shazbot.org \
--cc=dmatlack@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=vipinsh@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®