[PATCH 0/2] vfio/pci: Latch module parameters per device

From: Alex Williamson

Date: Thu Jun 11 2026 - 14:26:04 EST


The vfio-pci module pushes module parameters into vfio-pci-core at
initialization that change global policies for all devices, bound to
vfio-pci itself or other variant drivers. Not only is this generally bad
practice, but in the case of runtime PM, policy changes can affect
initialized devices, even while they're in use, resulting in unbalanced
operations.

This series first addresses the runtime PM case as a separate fix for
stable, latching the runtime PM support into the device. It then
expands the scope to pull the policy set by vfio-pci out of the core,
making each policy latched at the device by the variant driver.

This also has the effect of restoring the mutability of two of the module
parameters, where that functionality was lost with the vfio-pci-core
split. With this series, the current parameter values are latched into
the device at probe time.

Please review. Thanks,

Alex


Alex Williamson (2):
vfio/pci: Latch disable_idle_d3 per device
vfio/pci: Latch all module parameters per device

drivers/vfio/pci/vfio_pci.c | 30 +++++++++++++-----
drivers/vfio/pci/vfio_pci_core.c | 52 +++++++++++++++-----------------
include/linux/vfio_pci_core.h | 5 +--
3 files changed, 49 insertions(+), 38 deletions(-)

--
2.53.0