Re: [PATCH v2] vfio/pci: Use a private flag to prevent power state change with VFs
From: Raghavendra Rao Ananta
Date: Wed May 20 2026 - 23:49:52 EST
Hi Alex,
On Thu, May 21, 2026 at 12:23 AM Alex Williamson <alex@xxxxxxxxxxx> wrote:
>
> On Thu, 14 May 2026 17:34:49 +0000
> Raghavendra Rao Ananta <rananta@xxxxxxxxxx> wrote:
>
> > diff --git a/include/linux/vfio_pci_core.h b/include/linux/vfio_pci_core.h
> > index 2ebba746c18f7..f1451ee4744ac 100644
> > --- a/include/linux/vfio_pci_core.h
> > +++ b/include/linux/vfio_pci_core.h
> > @@ -127,6 +127,7 @@ struct vfio_pci_core_device {
> > bool needs_pm_restore:1;
> > bool pm_intx_masked:1;
> > bool pm_runtime_engaged:1;
> > + bool sriov_active:1;
>
> We should drop the bitfield use. I still need to respin my patches to
> cleanup bitfield races in general, but this looks like a runtime
> updated bitfield without any explicit locking convention with other
> flags in the same storage unit, so should therefore be its own bool.
>
> If we agree, I can do the s/:1// change on commit. Thanks,
>
Sure, it should be fine to have this flag as its own bool member. Feel
free to make the change.
Thank you.
Raghavendra