Lines Matching refs:ops

55 	const struct vfio_iommu_driver_ops	*ops;  member
92 const struct vfio_device_ops *ops; member
101 int vfio_register_iommu_driver(const struct vfio_iommu_driver_ops *ops) in vfio_register_iommu_driver() argument
109 driver->ops = ops; in vfio_register_iommu_driver()
115 if (tmp->ops == ops) { in vfio_register_iommu_driver()
130 void vfio_unregister_iommu_driver(const struct vfio_iommu_driver_ops *ops) in vfio_unregister_iommu_driver() argument
136 if (driver->ops == ops) { in vfio_unregister_iommu_driver()
366 const struct vfio_device_ops *ops, in vfio_group_create_device() argument
378 device->ops = ops; in vfio_group_create_device()
631 const struct vfio_device_ops *ops, void *device_data) in vfio_add_group_dev() argument
665 device = vfio_group_create_device(group, dev, ops, device_data); in vfio_add_group_dev()
803 if (device->ops->request) in vfio_del_group_dev()
804 device->ops->request(device_data, i++); in vfio_del_group_dev()
857 if (!try_module_get(driver->ops->owner)) in vfio_ioctl_check_extension()
860 ret = driver->ops->ioctl(NULL, in vfio_ioctl_check_extension()
863 module_put(driver->ops->owner); in vfio_ioctl_check_extension()
869 ret = driver->ops->ioctl(container->iommu_data, in vfio_ioctl_check_extension()
887 ret = driver->ops->attach_group(data, group->iommu_group); in __vfio_container_attach_groups()
897 driver->ops->detach_group(data, group->iommu_group); in __vfio_container_attach_groups()
928 if (!try_module_get(driver->ops->owner)) in vfio_ioctl_set_iommu()
938 if (driver->ops->ioctl(NULL, VFIO_CHECK_EXTENSION, arg) <= 0) { in vfio_ioctl_set_iommu()
939 module_put(driver->ops->owner); in vfio_ioctl_set_iommu()
946 data = driver->ops->open(arg); in vfio_ioctl_set_iommu()
949 module_put(driver->ops->owner); in vfio_ioctl_set_iommu()
958 driver->ops->release(data); in vfio_ioctl_set_iommu()
959 module_put(driver->ops->owner); in vfio_ioctl_set_iommu()
1000 ret = driver->ops->ioctl(data, cmd, arg); in vfio_fops_unl_ioctl()
1059 if (likely(driver && driver->ops->read)) in vfio_fops_read()
1060 ret = driver->ops->read(container->iommu_data, in vfio_fops_read()
1078 if (likely(driver && driver->ops->write)) in vfio_fops_write()
1079 ret = driver->ops->write(container->iommu_data, in vfio_fops_write()
1096 if (likely(driver && driver->ops->mmap)) in vfio_fops_mmap()
1097 ret = driver->ops->mmap(container->iommu_data, vma); in vfio_fops_mmap()
1129 driver->ops->detach_group(container->iommu_data, in __vfio_group_unset_container()
1137 driver->ops->release(container->iommu_data); in __vfio_group_unset_container()
1138 module_put(driver->ops->owner); in __vfio_group_unset_container()
1207 ret = driver->ops->attach_group(container->iommu_data, in vfio_group_set_container()
1248 ret = device->ops->open(device->device_data); in vfio_group_get_device_fd()
1260 device->ops->release(device->device_data); in vfio_group_get_device_fd()
1270 device->ops->release(device->device_data); in vfio_group_get_device_fd()
1425 device->ops->release(device->device_data); in vfio_device_fops_release()
1439 if (unlikely(!device->ops->ioctl)) in vfio_device_fops_unl_ioctl()
1442 return device->ops->ioctl(device->device_data, cmd, arg); in vfio_device_fops_unl_ioctl()
1450 if (unlikely(!device->ops->read)) in vfio_device_fops_read()
1453 return device->ops->read(device->device_data, buf, count, ppos); in vfio_device_fops_read()
1462 if (unlikely(!device->ops->write)) in vfio_device_fops_write()
1465 return device->ops->write(device->device_data, buf, count, ppos); in vfio_device_fops_write()
1472 if (unlikely(!device->ops->mmap)) in vfio_device_fops_mmap()
1475 return device->ops->mmap(device->device_data, vma); in vfio_device_fops_mmap()