iommu/amd: Wait for completion of IOTLB flush in attach_device

[ Upstream commit 0b15e02f0cc4fb34a9160de7ba6db3a4013dc1b7 ]

To make sure the domain tlb flush completes before the
function returns, explicitly wait for its completion.

Signed-off-by: Filippo Sironi <sironi@amazon.de>
Fixes: 42a49f965a8d ("amd-iommu: flush domain tlb when attaching a new device")
[joro: Added commit message and fixes tag]
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Filippo Sironi 2019-09-10 19:49:21 +02:00 committed by Greg Kroah-Hartman
parent cfae028fd3
commit a9e0dcfe6b

View File

@ -2113,6 +2113,8 @@ skip_ats_check:
*/
domain_flush_tlb_pde(domain);
domain_flush_complete(domain);
return ret;
}