int id;
        struct iommu_domain *default_domain;
        struct iommu_domain *domain;
+       struct list_head entry;
 };
 
 struct group_device {
        dev->iommu = NULL;
 }
 
-static int __iommu_probe_device(struct device *dev)
+static int __iommu_probe_device(struct device *dev, struct list_head *group_list)
 {
        const struct iommu_ops *ops = dev->bus->iommu_ops;
        struct iommu_device *iommu_dev;
        }
        iommu_group_put(group);
 
+       if (group_list && !group->default_domain && list_empty(&group->entry))
+               list_add_tail(&group->entry, group_list);
+
        iommu_device_link(iommu_dev, dev);
 
        return 0;
        if (ops->probe_device) {
                struct iommu_group *group;
 
-               ret = __iommu_probe_device(dev);
+               ret = __iommu_probe_device(dev, NULL);
 
                /*
                 * Try to allocate a default domain - needs support from the
        group->kobj.kset = iommu_group_kset;
        mutex_init(&group->mutex);
        INIT_LIST_HEAD(&group->devices);
+       INIT_LIST_HEAD(&group->entry);
        BLOCKING_INIT_NOTIFIER_HEAD(&group->notifier);
 
        ret = ida_simple_get(&iommu_group_ida, 0, 0, GFP_KERNEL);