Home
last modified time | relevance | path

Searched refs:hwpt (Results 1 – 6 of 6) sorted by relevance

/drivers/iommu/iommufd/
Dhw_pagetable.c12 struct iommufd_hw_pagetable *hwpt = in iommufd_hw_pagetable_destroy() local
15 if (!list_empty(&hwpt->hwpt_item)) { in iommufd_hw_pagetable_destroy()
16 mutex_lock(&hwpt->ioas->mutex); in iommufd_hw_pagetable_destroy()
17 list_del(&hwpt->hwpt_item); 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()
23 if (hwpt->domain) in iommufd_hw_pagetable_destroy()
24 iommu_domain_free(hwpt->domain); in iommufd_hw_pagetable_destroy()
26 refcount_dec(&hwpt->ioas->obj.users); in iommufd_hw_pagetable_destroy()
31 struct iommufd_hw_pagetable *hwpt = in iommufd_hw_pagetable_abort() local
[all …]
Ddevice.c25 WARN_ON(igroup->hwpt || !list_empty(&igroup->device_list)); in iommufd_group_release()
296 struct iommufd_hw_pagetable *hwpt) in iommufd_group_setup_msi() argument
314 if (sw_msi_start != PHYS_ADDR_MAX && !hwpt->msi_cookie) { in iommufd_group_setup_msi()
315 rc = iommu_get_msi_cookie(hwpt->domain, sw_msi_start); in iommufd_group_setup_msi()
323 hwpt->msi_cookie = true; in iommufd_group_setup_msi()
328 int iommufd_hw_pagetable_attach(struct iommufd_hw_pagetable *hwpt, in iommufd_hw_pagetable_attach() argument
335 if (idev->igroup->hwpt != NULL && idev->igroup->hwpt != hwpt) { in iommufd_hw_pagetable_attach()
342 rc = iommufd_hw_pagetable_enforce_cc(hwpt); in iommufd_hw_pagetable_attach()
347 rc = iopt_table_enforce_dev_resv_regions(&hwpt->ioas->iopt, idev->dev, in iommufd_hw_pagetable_attach()
360 rc = iommufd_group_setup_msi(idev->igroup, hwpt); in iommufd_hw_pagetable_attach()
[all …]
Diommufd_private.h246 int iommufd_hw_pagetable_enforce_cc(struct iommufd_hw_pagetable *hwpt);
247 int iommufd_hw_pagetable_attach(struct iommufd_hw_pagetable *hwpt,
256 struct iommufd_hw_pagetable *hwpt) in iommufd_hw_pagetable_put() argument
258 lockdep_assert_not_held(&hwpt->ioas->mutex); in iommufd_hw_pagetable_put()
259 if (hwpt->auto_domain) in iommufd_hw_pagetable_put()
260 iommufd_object_deref_user(ictx, &hwpt->obj); in iommufd_hw_pagetable_put()
262 refcount_dec(&hwpt->obj.users); in iommufd_hw_pagetable_put()
270 struct iommufd_hw_pagetable *hwpt; member
Dselftest.c328 struct iommufd_hw_pagetable *hwpt; in get_md_pagetable() local
335 hwpt = container_of(obj, struct iommufd_hw_pagetable, obj); in get_md_pagetable()
336 if (hwpt->domain->ops != mock_ops.default_domain_ops) { in get_md_pagetable()
337 iommufd_put_object(&hwpt->obj); in get_md_pagetable()
340 *mock = container_of(hwpt->domain, struct mock_iommu_domain, domain); in get_md_pagetable()
341 return hwpt; in get_md_pagetable()
518 struct iommufd_hw_pagetable *hwpt; in iommufd_test_md_check_pa() local
528 hwpt = get_md_pagetable(ucmd, mockpt_id, &mock); in iommufd_test_md_check_pa()
529 if (IS_ERR(hwpt)) in iommufd_test_md_check_pa()
530 return PTR_ERR(hwpt); in iommufd_test_md_check_pa()
[all …]
Dvfio_compat.c258 struct iommufd_hw_pagetable *hwpt; in iommufd_vfio_cc_iommu() local
267 list_for_each_entry(hwpt, &ioas->hwpt_list, hwpt_item) { in iommufd_vfio_cc_iommu()
268 if (!hwpt->enforce_cache_coherency) { in iommufd_vfio_cc_iommu()
Dmain.c309 struct iommu_hwpt_alloc hwpt; member