Lines Matching refs:ioas

347 	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,
517 mutex_lock(&ioas->mutex);
518 list_for_each_entry(hwpt, &ioas->hwpt_list, hwpt_item) {
542 hwpt = iommufd_hw_pagetable_alloc(idev->ictx, ioas, idev,
561 mutex_unlock(&ioas->mutex);
567 mutex_unlock(&ioas->mutex);
592 struct iommufd_ioas *ioas =
595 destroy_hwpt = iommufd_device_auto_get_domain(idev, ioas, pt_id,
694 struct iommufd_ioas *cur_ioas = access->ioas; in iommufd_access_change_ioas()
710 access->ioas = NULL; in iommufd_access_change_ioas()
715 access->ioas = cur_ioas; in iommufd_access_change_ioas()
731 access->ioas = new_ioas; in iommufd_access_change_ioas()
739 struct iommufd_ioas *ioas = iommufd_get_ioas(access->ictx, id); in iommufd_access_change_ioas_id() local
742 if (IS_ERR(ioas)) in iommufd_access_change_ioas_id()
743 return PTR_ERR(ioas); in iommufd_access_change_ioas_id()
744 rc = iommufd_access_change_ioas(access, ioas); in iommufd_access_change_ioas_id()
745 iommufd_put_object(&ioas->obj); in iommufd_access_change_ioas_id()
755 if (access->ioas) in iommufd_access_destroy_object()
822 if (WARN_ON(!access->ioas)) { in iommufd_access_detach()
836 if (WARN_ON(access->ioas)) { in iommufd_access_attach()
852 if (!access->ioas) { in iommufd_access_replace()
881 struct iommufd_ioas *ioas = in iommufd_access_notify_unmap() local
886 xa_lock(&ioas->iopt.access_list); in iommufd_access_notify_unmap()
887 xa_for_each(&ioas->iopt.access_list, index, access) { in iommufd_access_notify_unmap()
890 xa_unlock(&ioas->iopt.access_list); in iommufd_access_notify_unmap()
895 xa_lock(&ioas->iopt.access_list); in iommufd_access_notify_unmap()
897 xa_unlock(&ioas->iopt.access_list); in iommufd_access_notify_unmap()
1004 if (!access->ioas) { in iommufd_access_pin_pages()
1008 iopt = &access->ioas->iopt; in iommufd_access_pin_pages()
1087 if (!access->ioas) { in iommufd_access_rw()
1091 iopt = &access->ioas->iopt; in iommufd_access_rw()