Skip to contentSkip to conversation

VFIO fixes for v7.2-rc2

GIT PULL Merged Alex Williamson 2 participants 2 messages Jul 2 – Jul 3 KVM

lore
Share & tools
lore
#0 lore raw

Hi Linus,

Mostly straightforward fixes here, inconsistent runtime PM handling due to global device policies, bitfield races, unwind path gaps, teardown ordering, and a misplaced library flag. The overall latching of module parameters per device could include Fixes: c61302aa48f7 ("vfio/pci:
Move module parameters to vfio_pci.c") [v5.15]. However, since this is largely a module parameter mechanics issue, I chose not to flag it for automatic stable backports. The per-device latching also leaves a gap in debug'ability, which is filled here with a debugfs surface. Thanks,

Alex

The following changes since commit dc59e4fea9d83f03bad6bddf3fa2e52491777482:

Linux 7.2-rc1 (2026-06-28 12:01:31 -0700)

are available in the Git repository at:

https://github.com/awilliam/linux-vfio.git tags/vfio-v7.2-rc2

for you to fetch changes up to e242e974e812e7a47e3088860c80d9492fac314f:

vfio: selftests: Add luuid to libvfio.mk's list of libraries, not to the Makefile (2026-06-30 15:50:55 -0600)

----------------------------------------------------------------
VFIO fixes for v7.2-rc2

- Fix racy bitfield updates in vfio-pci-core and the mlx5 vfio-pci variant driver with a binary split between setup/release and runtime modified flags. These were noted across several Sashiko reviews as pre-existing issues. (Alex Williamson)

- Fix runtime PM inconsistency where the vfio-pci driver module_init could modify the idle PM policy of existing devices through globals managed in vfio-pci-core, leading to unbalanced runtime PM operations. (Alex Williamson)

- Restore mutability of writable vfio-pci module options by further pulling policy globals out of vfio-pci-core, to instead be latched per device at device init. Provide visibility of the per device latched values through debugfs. (Alex Williamson)

- Fix missing VGA arbiter uninit callback in unwind path. (Alex Williamson)

- Reorder device debugfs removal before device_del() to avoid gap where debugfs is available with stale devres pointers. (Alex Williamson)

- Move UUID library linking flag from vfio selftest Makefile into libvfio.mk to avoid exposing such dependencies when linking with KVM selftests. (Sean Christopherson)

----------------------------------------------------------------
Alex Williamson (7):
vfio/pci: Latch disable_idle_d3 per device
vfio/pci: Release the VGA arbiter client on register_device() failure vfio/pci: Fix racy bitfields and tighten struct layout vfio/mlx5: Fix racy bitfields and tighten struct layout vfio/pci: Latch all module parameters per device
vfio: Remove device debugfs before releasing devres vfio/pci: Expose latched module parameter policy in debugfs

Sean Christopherson (1):
vfio: selftests: Add luuid to libvfio.mk's list of libraries, not to the Makefile

 Documentation/ABI/testing/debugfs-vfio      |  26 +++++++
 drivers/vfio/debugfs.c                      |   1 +
 drivers/vfio/pci/mlx5/cmd.h                 |  15 +++--
 drivers/vfio/pci/vfio_pci.c                 |  30 ++++++---
 drivers/vfio/pci/vfio_pci_core.c            | 101 ++++++++++++++++++++--------
 drivers/vfio/vfio_main.c                    |   8 ++-
 include/linux/vfio_pci_core.h               |  18 +++--
 tools/testing/selftests/vfio/Makefile       |   2 -
 tools/testing/selftests/vfio/lib/libvfio.mk |   2 +
 9 files changed, 152 insertions(+), 51 deletions(-)