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