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

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: 42a49f965a ("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>
This commit is contained in:
Filippo Sironi 2019-09-10 19:49:21 +02:00 committed by Joerg Roedel
parent cc449541f2
commit 0b15e02f0c

View file

@ -2212,6 +2212,8 @@ static int attach_device(struct device *dev,
*/
domain_flush_tlb_pde(domain);
domain_flush_complete(domain);
return ret;
}