]> git.hungrycats.org Git - linux/commitdiff
iommu/amd: Finish TLB flush in amd_iommu_unmap()
authorJoerg Roedel <jroedel@suse.de>
Fri, 13 Oct 2017 12:32:37 +0000 (14:32 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 2 Nov 2017 06:09:50 +0000 (07:09 +0100)
commit ce76353f169a6471542d999baf3d29b121dce9c0 upstream.

The function only sends the flush command to the IOMMU(s),
but does not wait for its completion when it returns. Fix
that.

Fixes: 601367d76bd1 ('x86/amd-iommu: Remove iommu_flush_domain function')
Cc: stable@vger.kernel.org # >= 2.6.33
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/iommu/amd_iommu.c

index 0e7cd14bf7bbaddcca84bf237865b9229640dd01..88ba9649bd1fe52dbf7fc25c9b75bef7a3c89645 100644 (file)
@@ -3402,6 +3402,7 @@ static size_t amd_iommu_unmap(struct iommu_domain *dom, unsigned long iova,
        mutex_unlock(&domain->api_lock);
 
        domain_flush_tlb_pde(domain);
+       domain_flush_complete(domain);
 
        return unmap_size;
 }