On 2026-03-24 09:08 PM, Yi Liu wrote: > On 3/24/26 07:58, David Matlack wrote: > > From: Vipin Sharma <[email protected]> > > > > Enable userspace to retrieve preserved VFIO device files from VFIO after > > a Live Update by implementing the retrieve() and finish() file handler > > callbacks. > > > > Use an anonymous inode when creating the file, since the retrieved > > device file is not opened through any particular cdev inode, and the > > cdev inode does not matter in practice. > > do we have a list of struct file fields that do not matter?
My understanding is that VFIO only cares about these fields in struct file: - private_data: Pointer to struct vfio_device_file - f_op: Pointer to vfio_device_fops - f_mapping: Pointer to vfio_device->inode->i_mapping This is based on cross-referencing VFIO_GROUP_GET_DEVICE_FD (which uses an anonymous inode) and the cdev code. > > +err_free_device_file: > > + kvfree(df); > > any reason to use kvfree()? No this can be kfree(). Will fix in v4.

