Re: [PATCH v3 8/8] vfio/pci: Add the support for PCI D3cold state

Jason Gunthorpe
2022-05-30T12:25:55Z

On Mon, May 30, 2022 at 04:45:59PM +0530, Abhishek Sahu wrote:

> 1. In real use case, config or any other ioctl should not come along
> with VFIO_DEVICE_FEATURE_POWER_MANAGEMENT ioctl request.
>
> 2. Maintain some 'access_count' which will be incremented when we
> do any config space access or ioctl.

Please don't open code locks - if you need a lock then write a proper
lock. You can use the 'try' variants to bail out in cases where that
is appropriate.

Jason