All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] vfio/pci: Latch module parameters per device
@ 2026-06-11 18:25 Alex Williamson
  2026-06-11 18:25 ` [PATCH 1/2] vfio/pci: Latch disable_idle_d3 " Alex Williamson
  2026-06-11 18:25 ` [PATCH 2/2] vfio/pci: Latch all module parameters " Alex Williamson
  0 siblings, 2 replies; 5+ messages in thread
From: Alex Williamson @ 2026-06-11 18:25 UTC (permalink / raw)
  To: kvm, Alex Williamson
  Cc: Alex Williamson, linux-kernel, Jason Gunthorpe, Kevin Tian, kanie

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


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

end of thread, other threads:[~2026-06-11 19:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-11 18:25 [PATCH 0/2] vfio/pci: Latch module parameters per device Alex Williamson
2026-06-11 18:25 ` [PATCH 1/2] vfio/pci: Latch disable_idle_d3 " Alex Williamson
2026-06-11 18:25 ` [PATCH 2/2] vfio/pci: Latch all module parameters " Alex Williamson
2026-06-11 18:44   ` sashiko-bot
2026-06-11 19:06     ` Alex Williamson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.