iommu/amd: Wait for completion of IOTLB flush in attach_device
authorFilippo Sironi <sironi@amazon.de>
Tue, 10 Sep 2019 17:49:21 +0000 (19:49 +0200)
committerJoerg Roedel <jroedel@suse.de>
Tue, 24 Sep 2019 09:40:04 +0000 (11:40 +0200)
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>
drivers/iommu/amd_iommu.c

index fda9923..7bdce3b 100644 (file)
@@ -2212,6 +2212,8 @@ skip_ats_check:
         */
        domain_flush_tlb_pde(domain);
 
+       domain_flush_complete(domain);
+
        return ret;
 }