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

From: Jason Gunthorpe
Date: Mon May 30 2022 - 08:25:56 EST


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