Kernel KVM virtualization development
 help / color / mirror / Atom feed
* [PATCH 0/2] vfio: Fix racy bitfields and tighten struct layout
@ 2026-05-07 19:22 Alex Williamson
  2026-05-07 19:22 ` [PATCH 1/2] vfio/pci: " Alex Williamson
  2026-05-07 19:22 ` [PATCH 2/2] vfio/mlx5: " Alex Williamson
  0 siblings, 2 replies; 3+ messages in thread
From: Alex Williamson @ 2026-05-07 19:22 UTC (permalink / raw)
  To: alex; +Cc: Alex Williamson, kvm, jgg, rananta, yishaih

This follows Raghavendra's "vfio/pci: Use a private flag to prevent
power state change with VFs"[1] and addresses a portion of the
Sashiko review[2].  The review flagged that the new sriov_pwr_active:1
bitfield shares storage with concurrently-updated neighbors so a
bitfield RMW could clobber an adjacent field's update.
                                                            
Auditing bitfield users in vfio_pci_core_device finds several
pre-existing fields with the same hazard, and an analogous pattern in
mlx5_vhca_page_tracker / mlx5vf_pci_core_device.  This series splits
all such fields out of their shared storage words, resolving both the
existing and proposed cases.  Applies on top of [1].

Thanks,
Alex

[1] https://lore.kernel.org/all/20260504224142.1041477-1-rananta@google.com/
[2] https://sashiko.dev/#/patchset/20260504224142.1041477-1-rananta@google.com

Alex Williamson (2):
  vfio/pci: Fix racy bitfields and tighten struct layout
  vfio/mlx5: Fix racy bitfields and tighten struct layout

 drivers/vfio/pci/mlx5/cmd.h   |  8 ++++----
 include/linux/vfio_pci_core.h | 10 +++++-----
 2 files changed, 9 insertions(+), 9 deletions(-)

-- 
2.51.0


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

end of thread, other threads:[~2026-05-07 19:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-07 19:22 [PATCH 0/2] vfio: Fix racy bitfields and tighten struct layout Alex Williamson
2026-05-07 19:22 ` [PATCH 1/2] vfio/pci: " Alex Williamson
2026-05-07 19:22 ` [PATCH 2/2] vfio/mlx5: " Alex Williamson

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