Re: [PATCH v2 1/2] vfio/pci: Fix racy bitfields and tighten struct layout

From: Jason Gunthorpe

Date: Wed May 13 2026 - 08:31:37 EST


On Tue, May 12, 2026 at 12:23:55PM -0600, Alex Williamson wrote:

> It's not clear the bit compaction is worth the subtle RMW scenarios.
> What do you think, should we reserve bitfields for setup/release-time to
> avoid this class of issue or handle these as individual point fixes?

I think one patch is fine, just that every group of bitfields should
have a description what the locking rule is to write to
it. 'setup/release only' is a fine rule too

Otherwise the next person to add a bitfield will randomly select a
group and we will be back to this again..

Jason