Skip to contentSkip to conversation

iommu/amd: Correct the wrong setting of alias DTE in do_attach

PATCH Applied Baoquan He 2 participants 2 messages Jan 20, 2016 – Jan 29, 2016 1 message not in the archive IOMMU

lore
Share & tools
lore

Baoquan He

author
#0 lore raw

PATCH 1/1 iommu/amd: Correct the wrong setting of alias DTE in do_attach

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 <[email protected]>
Date:   Tue Oct 20 17:33:38 2015 +0200

iommu/amd: Set alias DTE in do_attach/do_detach

---
 drivers/iommu/amd_iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/amd_iommu.c +1 -1
index 539b0de..e5e2239 100644
@@ -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);
 }
Signature · 1 line
2.5.0

A message that is not in the archive (sent off-list or not yet received): 1453298479-15434-1-git-send-email-bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org

Applied
#2 lore raw
Quoted 4 lines · Baoquan He

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.

Quoted 8 lines

commit e25bfb56ea7f046b71414e02f80f620deb5c6362

Author: Joerg Roedel <[email protected]>
Date:   Tue Oct 20 17:33:38 2015 +0200

iommu/amd: Set alias DTE in do_attach/do_detach

Applied, thanks.