Lines Matching refs:group
27 xa_cmpxchg(&igroup->ictx->groups, iommu_group_id(igroup->group), igroup,
29 iommu_group_put(igroup->group);
34 static void iommufd_put_group(struct iommufd_group *group)
36 kref_put(&group->ref, iommufd_group_release);
40 struct iommu_group *group)
45 * group ID's cannot be re-used until the group is put back which does
48 if (WARN_ON(igroup->group != group))
66 struct iommu_group *group;
69 group = iommu_group_get(dev);
70 if (!group)
73 id = iommu_group_id(group);
77 if (iommufd_group_try_get(igroup, group)) {
79 iommu_group_put(group);
86 iommu_group_put(group);
94 /* group reference moves into new_igroup */
95 new_igroup->group = group;
124 /* Check again if the current group is any good */
125 if (iommufd_group_try_get(igroup, group)) {
186 !iommu_group_has_isolated_msi(igroup->group)) {
238 * iommufd_ctx_has_group - True if any device within the group is bound
241 * @group: Pointer to a physical iommu_group struct
243 * True if any device within the group has been bound to this ictx, ex. via
244 * iommufd_device_bind(), therefore implying ictx ownership of the group.
246 bool iommufd_ctx_has_group(struct iommufd_ctx *ictx, struct iommu_group *group)
251 if (!ictx || !group)
258 ->igroup->group == group) {
353 * Only attach to the group once for the first device that is in the
354 * group. All the other devices will follow this attachment. The user
364 rc = iommu_attach_group(hwpt->domain, idev->igroup->group);
388 iommu_detach_group(hwpt->domain, idev->igroup->group);
456 rc = iommu_group_replace_domain(igroup->group, hwpt->domain);