Home
last modified time | relevance | path

Searched refs:ioas (Results 1 – 7 of 7) sorted by relevance

/linux-6.6.21/drivers/iommu/iommufd/
Dvfio_compat.c17 struct iommufd_ioas *ioas = ERR_PTR(-ENODEV); in get_compat_ioas() local
22 ioas = ictx->vfio_ioas; in get_compat_ioas()
25 return ioas; in get_compat_ioas()
38 struct iommufd_ioas *ioas; in iommufd_vfio_compat_ioas_get_id() local
40 ioas = get_compat_ioas(ictx); in iommufd_vfio_compat_ioas_get_id()
41 if (IS_ERR(ioas)) in iommufd_vfio_compat_ioas_get_id()
42 return PTR_ERR(ioas); in iommufd_vfio_compat_ioas_get_id()
43 *out_ioas_id = ioas->obj.id; in iommufd_vfio_compat_ioas_get_id()
44 iommufd_put_object(&ioas->obj); in iommufd_vfio_compat_ioas_get_id()
82 struct iommufd_ioas *ioas = NULL; in iommufd_vfio_compat_ioas_create() local
[all …]
Dioas.c14 struct iommufd_ioas *ioas = container_of(obj, struct iommufd_ioas, obj); in iommufd_ioas_destroy() local
17 rc = iopt_unmap_all(&ioas->iopt, NULL); in iommufd_ioas_destroy()
19 iopt_destroy_table(&ioas->iopt); in iommufd_ioas_destroy()
20 mutex_destroy(&ioas->mutex); in iommufd_ioas_destroy()
25 struct iommufd_ioas *ioas; in iommufd_ioas_alloc() local
27 ioas = iommufd_object_alloc(ictx, ioas, IOMMUFD_OBJ_IOAS); in iommufd_ioas_alloc()
28 if (IS_ERR(ioas)) in iommufd_ioas_alloc()
29 return ioas; in iommufd_ioas_alloc()
31 iopt_init_table(&ioas->iopt); in iommufd_ioas_alloc()
32 INIT_LIST_HEAD(&ioas->hwpt_list); in iommufd_ioas_alloc()
[all …]
Dhw_pagetable.c16 mutex_lock(&hwpt->ioas->mutex); in iommufd_hw_pagetable_destroy()
18 mutex_unlock(&hwpt->ioas->mutex); in iommufd_hw_pagetable_destroy()
20 iopt_table_remove_domain(&hwpt->ioas->iopt, hwpt->domain); in iommufd_hw_pagetable_destroy()
26 refcount_dec(&hwpt->ioas->obj.users); in iommufd_hw_pagetable_destroy()
35 lockdep_assert_held(&hwpt->ioas->mutex); in iommufd_hw_pagetable_abort()
39 iopt_table_remove_domain(&hwpt->ioas->iopt, hwpt->domain); in iommufd_hw_pagetable_abort()
74 iommufd_hw_pagetable_alloc(struct iommufd_ctx *ictx, struct iommufd_ioas *ioas, in iommufd_hw_pagetable_alloc() argument
80 lockdep_assert_held(&ioas->mutex); in iommufd_hw_pagetable_alloc()
88 refcount_inc(&ioas->obj.users); in iommufd_hw_pagetable_alloc()
89 hwpt->ioas = ioas; in iommufd_hw_pagetable_alloc()
[all …]
Ddevice.c347 rc = iopt_table_enforce_dev_resv_regions(&hwpt->ioas->iopt, idev->dev, in iommufd_hw_pagetable_attach()
374 iopt_remove_reserved_iova(&hwpt->ioas->iopt, idev->dev); in iommufd_hw_pagetable_attach()
391 iopt_remove_reserved_iova(&hwpt->ioas->iopt, idev->dev); in iommufd_hw_pagetable_detach()
443 if (hwpt->ioas != old_hwpt->ioas) { in iommufd_device_do_replace()
446 &hwpt->ioas->iopt, cur->dev, NULL); in iommufd_device_do_replace()
460 if (hwpt->ioas != old_hwpt->ioas) { in iommufd_device_do_replace()
462 iopt_remove_reserved_iova(&old_hwpt->ioas->iopt, in iommufd_device_do_replace()
482 iopt_remove_reserved_iova(&hwpt->ioas->iopt, cur->dev); in iommufd_device_do_replace()
498 struct iommufd_ioas *ioas, u32 *pt_id, in iommufd_device_auto_get_domain() argument
517 mutex_lock(&ioas->mutex); in iommufd_device_auto_get_domain()
[all …]
Dselftest.c75 struct iommufd_ioas *ioas; in iommufd_test_syz_conv_iova_id() local
81 ioas = iommufd_get_ioas(ucmd->ictx, ioas_id); in iommufd_test_syz_conv_iova_id()
82 if (IS_ERR(ioas)) in iommufd_test_syz_conv_iova_id()
84 *iova = iommufd_test_syz_conv_iova(&ioas->iopt, iova); in iommufd_test_syz_conv_iova_id()
85 iommufd_put_object(&ioas->obj); in iommufd_test_syz_conv_iova_id()
500 struct iommufd_ioas *ioas; in iommufd_test_add_reserved() local
503 ioas = iommufd_get_ioas(ucmd->ictx, mockpt_id); in iommufd_test_add_reserved()
504 if (IS_ERR(ioas)) in iommufd_test_add_reserved()
505 return PTR_ERR(ioas); in iommufd_test_add_reserved()
506 down_write(&ioas->iopt.iova_rwsem); in iommufd_test_add_reserved()
[all …]
Diommufd_private.h234 struct iommufd_ioas *ioas; member
244 iommufd_hw_pagetable_alloc(struct iommufd_ctx *ictx, struct iommufd_ioas *ioas,
258 lockdep_assert_not_held(&hwpt->ioas->mutex); in iommufd_hw_pagetable_put()
304 struct iommufd_ioas *ioas; member
DMakefile6 ioas.o \