Commit abbb8a09 authored by Robin Murphy's avatar Robin Murphy Committed by Joerg Roedel

iommu/iova: Don't try to copy anchor nodes

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: default avatarkernel test robot <fengguang.wu@intel.com>
Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
Fixes: bb68b2fb ('iommu/iova: Add rbtree anchor node')
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent e8b19840
...@@ -704,6 +704,9 @@ copy_reserved_iova(struct iova_domain *from, struct iova_domain *to) ...@@ -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 *iova = rb_entry(node, struct iova, node);
struct iova *new_iova; struct iova *new_iova;
if (iova->pfn_lo == IOVA_ANCHOR)
continue;
new_iova = reserve_iova(to, iova->pfn_lo, iova->pfn_hi); new_iova = reserve_iova(to, iova->pfn_lo, iova->pfn_hi);
if (!new_iova) if (!new_iova)
printk(KERN_ERR "Reserve iova range %lx@%lx failed\n", printk(KERN_ERR "Reserve iova range %lx@%lx failed\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment