Kernel KVM virtualization development
 help / color / mirror / Atom feed
* [PATCH v2 00/10] selftests/vfio: igb: Add driver for Intel
@ 2026-05-26 23:54 Josh Hilke
  2026-05-26 23:54 ` [PATCH v2 01/10] selftests/vfio: igb: Add driver for IGB QEMU device Josh Hilke
                   ` (9 more replies)
  0 siblings, 10 replies; 17+ messages in thread
From: Josh Hilke @ 2026-05-26 23:54 UTC (permalink / raw)
  To: Alex Williamson, David Matlack
  Cc: Vipin Sharma, Shuah Khan, kvm, linux-kernel, linux-kselftest,
	Josh Hilke

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


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2026-05-29 20:24 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-26 23:54 [PATCH v2 00/10] selftests/vfio: igb: Add driver for Intel Josh Hilke
2026-05-26 23:54 ` [PATCH v2 01/10] selftests/vfio: igb: Add driver for IGB QEMU device Josh Hilke
2026-05-27  0:32   ` sashiko-bot
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-27  0:14   ` sashiko-bot
2026-05-29 20:24     ` Alex Williamson
2026-05-26 23:54 ` [PATCH v2 04/10] selftests/vfio: igb: Program MSI-X interrupt routing Josh Hilke
2026-05-27  0:19   ` sashiko-bot
2026-05-29 20:24     ` Alex Williamson
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-05-26 23:54 ` [PATCH v2 08/10] selftests/vfio: igb: Factor hardware programming into igb_hw_init() Josh Hilke
2026-05-26 23:54 ` [PATCH v2 09/10] selftests/vfio: igb: Recover after DMA-read faults Josh Hilke
2026-05-26 23:54 ` [PATCH v2 10/10] selftests/vfio: igb: Use offical IGB headers in selftest driver Josh Hilke
2026-05-27  2:40   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox