iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iommu/iova: Don't try to copy anchor nodes
@ 2017-10-02 10:53 Robin Murphy
       [not found] ` <3f64827632194aa89821d9183baa08321f00167d.1506941611.git.robin.murphy-5wv7dgnIgG8@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Robin Murphy @ 2017-10-02 10:53 UTC (permalink / raw)
  To: joro; +Cc: iommu, linux-kernel

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>
---
 drivers/iommu/iova.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/iommu/iova.c b/drivers/iommu/iova.c
index bd854ca9fa80..c258ba84ee62 100644
--- a/drivers/iommu/iova.c
+++ b/drivers/iommu/iova.c
@@ -705,6 +705,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",
-- 
2.13.4.dirty

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] iommu/iova: Don't try to copy anchor nodes
       [not found] ` <3f64827632194aa89821d9183baa08321f00167d.1506941611.git.robin.murphy-5wv7dgnIgG8@public.gmane.org>
@ 2017-10-02 13:47   ` Joerg Roedel
  0 siblings, 0 replies; 2+ messages in thread
From: Joerg Roedel @ 2017-10-02 13:47 UTC (permalink / raw)
  To: Robin Murphy
  Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On Mon, Oct 02, 2017 at 11:53:31AM +0100, Robin Murphy wrote:
> 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-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>
> ---
>  drivers/iommu/iova.c | 3 +++
>  1 file changed, 3 insertions(+)

Added 'Fixes:'-tag and applied it, thanks Robin.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-10-02 13:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-02 10:53 [PATCH] iommu/iova: Don't try to copy anchor nodes Robin Murphy
     [not found] ` <3f64827632194aa89821d9183baa08321f00167d.1506941611.git.robin.murphy-5wv7dgnIgG8@public.gmane.org>
2017-10-02 13:47   ` Joerg Roedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).