]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
iommu/iova: Don't try to copy anchor nodes
authorRobin Murphy <robin.murphy@arm.com>
Mon, 2 Oct 2017 10:53:31 +0000 (11:53 +0100)
committerJoerg Roedel <jroedel@suse.de>
Mon, 2 Oct 2017 13:45:24 +0000 (15:45 +0200)
Anchor nodes are not reserved IOVAs in the way that copy_reserved_iova()
cares about - while the failure from reserve_iova() is benign since the
target domain will already have its own anchor, we still don't want to
be triggering spurious warnings.

Reported-by: kernel test robot <fengguang.wu@intel.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Fixes: bb68b2fbfbd6 ('iommu/iova: Add rbtree anchor node')
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/iova.c

index b0ca23682008576f1c39e48837638c07077938e1..3aee64b99df12f5da6d11f963e22c46fb04d97a1 100644 (file)
@@ -704,6 +704,9 @@ copy_reserved_iova(struct iova_domain *from, struct iova_domain *to)
                struct iova *iova = rb_entry(node, struct iova, node);
                struct iova *new_iova;
 
+               if (iova->pfn_lo == IOVA_ANCHOR)
+                       continue;
+
                new_iova = reserve_iova(to, iova->pfn_lo, iova->pfn_hi);
                if (!new_iova)
                        printk(KERN_ERR "Reserve iova range %lx@%lx failed\n",