Lines Matching refs:df

165 static int vfio_df_group_open(struct vfio_device_file *df)  in vfio_df_group_open()  argument
167 struct vfio_device *device = df->device; in vfio_df_group_open()
187 df->iommufd = device->group->iommufd; in vfio_df_group_open()
188 if (df->iommufd && vfio_device_is_noiommu(device) && device->open_count == 0) { in vfio_df_group_open()
195 vfio_iommufd_device_has_compat_ioas(device, df->iommufd)) { in vfio_df_group_open()
201 ret = vfio_df_open(df); in vfio_df_group_open()
205 if (df->iommufd && device->open_count == 1) { in vfio_df_group_open()
206 ret = vfio_iommufd_compat_attach_ioas(device, df->iommufd); in vfio_df_group_open()
215 smp_store_release(&df->access_granted, true); in vfio_df_group_open()
222 vfio_df_close(df); in vfio_df_group_open()
224 df->iommufd = NULL; in vfio_df_group_open()
233 void vfio_df_group_close(struct vfio_device_file *df) in vfio_df_group_close() argument
235 struct vfio_device *device = df->device; in vfio_df_group_close()
240 vfio_df_close(df); in vfio_df_group_close()
241 df->iommufd = NULL; in vfio_df_group_close()
252 struct vfio_device_file *df; in vfio_device_open_file() local
256 df = vfio_allocate_device_file(device); in vfio_device_open_file()
257 if (IS_ERR(df)) { in vfio_device_open_file()
258 ret = PTR_ERR(df); in vfio_device_open_file()
262 df->group = device->group; in vfio_device_open_file()
264 ret = vfio_df_group_open(df); in vfio_device_open_file()
269 df, O_RDWR, FMODE_PREAD | FMODE_PWRITE); in vfio_device_open_file()
291 vfio_df_group_close(df); in vfio_device_open_file()
293 kfree(df); in vfio_device_open_file()