> From: Liu, Yi L <yi.l.liu@xxxxxxxxx> > 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.