RE: [PATCH v3 0/6] vfio/pci: Latch module params, fix bitfield use and VGA unwind

From: Tian, Kevin

Date: Wed Jun 17 2026 - 03:46:51 EST


> From: Alex Williamson <alex.williamson@xxxxxxxxxx>
> Sent: Tuesday, June 16, 2026 3:12 AM
>
> The vfio-pci module pushes module parameters into vfio-pci-core at
> initialization that change global policies for all devices, whether
> 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.
>
> Then, in preparing for moving disable_vga to per device, it's discovered
> that we lack proper unwind support for a registration failure, leaving
> the VGA arbiter client registered. This is resolved before it turns into
> an issue, also marked for stable.
>
> Next, we're again reminded of the risky bitfield use in both the
> vfio-pci-core and mlx5 variant driver, therefore before expanding use
> for more per-device flags, perform the binary split to categorize
> flags as either setup/release or runtime to avoid RMW hazards of the
> bitfields. Also for stable.
>
> Finally, close the series by pulling vfio-pci module parameter policy
> out of the core, latching each into the device structure.
>
> This latter change 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
>

Looks good. for the whole series:

Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>