All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iommu/amd: Correct the wrong setting of alias DTE in do_attach
@ 2016-01-20 14:01 Baoquan He
       [not found] ` <1453298479-15434-1-git-send-email-bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Baoquan He @ 2016-01-20 14:01 UTC (permalink / raw)
  To: joro-zLv9SwRftAIdnm+yROfE0A
  Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA

In below commit alias DTE is set when its peripheral is
setting DTE. However there's a code bug here to wrongly
set the alias DTE, correct it in this patch.

commit e25bfb56ea7f046b71414e02f80f620deb5c6362
Author: Joerg Roedel <jroedel-l3A5Bk7waGM@public.gmane.org>
Date:   Tue Oct 20 17:33:38 2015 +0200

    iommu/amd: Set alias DTE in do_attach/do_detach

Signed-off-by: Baoquan He <bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Tested-by: Mark Hounschell <markh-n2QNKt385d+sTnJN9+BGXg@public.gmane.org>
---
 drivers/iommu/amd_iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 539b0de..e5e2239 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -2049,7 +2049,7 @@ static void do_attach(struct iommu_dev_data *dev_data,
 	/* Update device table */
 	set_dte_entry(dev_data->devid, domain, ats);
 	if (alias != dev_data->devid)
-		set_dte_entry(dev_data->devid, domain, ats);
+		set_dte_entry(alias, domain, ats);
 
 	device_flush_dte(dev_data);
 }
-- 
2.5.0

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

* Re: [PATCH] iommu/amd: Correct the wrong setting of alias DTE in do_attach
       [not found] ` <1453298479-15434-1-git-send-email-bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2016-01-29 11:28   ` Joerg Roedel
  0 siblings, 0 replies; 2+ messages in thread
From: Joerg Roedel @ 2016-01-29 11:28 UTC (permalink / raw)
  To: Baoquan He; +Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA

On Wed, Jan 20, 2016 at 10:01:19PM +0800, Baoquan He wrote:
> In below commit alias DTE is set when its peripheral is
> setting DTE. However there's a code bug here to wrongly
> set the alias DTE, correct it in this patch.
> 
> commit e25bfb56ea7f046b71414e02f80f620deb5c6362
> Author: Joerg Roedel <jroedel-l3A5Bk7waGM@public.gmane.org>
> Date:   Tue Oct 20 17:33:38 2015 +0200
> 
>     iommu/amd: Set alias DTE in do_attach/do_detach
> 
> Signed-off-by: Baoquan He <bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> Tested-by: Mark Hounschell <markh-n2QNKt385d+sTnJN9+BGXg@public.gmane.org>

Applied, thanks.

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

end of thread, other threads:[~2016-01-29 11:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-20 14:01 [PATCH] iommu/amd: Correct the wrong setting of alias DTE in do_attach Baoquan He
     [not found] ` <1453298479-15434-1-git-send-email-bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-01-29 11:28   ` Joerg Roedel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.