[Intel-gfx] [PATCH v3 03/15] vfio: Accept vfio device file in the driver facing kAPI

Liu, Yi L yi.l.liu at intel.com
Sat Feb 18 02:54:28 UTC 2023


> From: Jason Gunthorpe <jgg at nvidia.com>
> Sent: Friday, February 17, 2023 11:59 PM
> 
> On Fri, Feb 17, 2023 at 10:55:08AM +0000, Liu, Yi L wrote:
> 
> > One more thinking on this. For a single device, my above reply is true.
> > The device should have been fully-opened when its
> GET_PCI_HOT_RESET_INFO
> > and HOT_RESET path have been unblocked. However, when there are
> > multiple devices that have been affected by the hotreset. User may only
> > have one device that is fully opened while others are not yet. In such case,
> > existing vfio_file_is_valid() is not enough. Shall we have another API for
> > this purpose? E.g. if it's cdev fd, then the new API return true only when
> > the device is fully opened. Any suggestion here?
> 
> I think what I heard is you need two APIs, one for pci and one for KVM
> and the PCI one requires binding to succeed.

Yes.

One is vfio_file_is_valid() - for KVM
Another one is vfio_file_device_opened() - for PCI.

Regards,
Yi Liu


More information about the Intel-gfx mailing list