[Intel-gfx] [PATCH v4 03/19] vfio: Accept vfio device file in the driver facing kAPI
Tian, Kevin
kevin.tian at intel.com
Wed Feb 22 07:15:43 UTC 2023
> From: Liu, Yi L <yi.l.liu at intel.com>
> Sent: Tuesday, February 21, 2023 11:48 AM
>
> /**
> * vfio_file_is_valid - True if the file is valid vfio file
> * @file: VFIO group file or VFIO device file
> */
> bool vfio_file_is_valid(struct file *file)
> {
> - return vfio_group_from_file(file);
> + return vfio_group_from_file(file) ||
> + vfio_device_from_file(file);
> }
> EXPORT_SYMBOL_GPL(vfio_file_is_valid);
Following previous Alex's comment I'd leave pci hot reset path
to continue calling vfio_file_is_group() at this point so the uAPI
semantics is not changed here before patch 9 comes to properly
handle device fd in that path.
More information about the Intel-gfx
mailing list