iommu/amd: make sure TLB to be flushed before IOVA freed
authorZhen Lei <thunder.leizhen@huawei.com>
Wed, 6 Jun 2018 02:18:46 +0000 (10:18 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Oct 2018 00:00:46 +0000 (17:00 -0700)
commit834a9ef5f8318fd40741c4369600dd05d60f98d8
tree2b14369e3137e157cd6dcfe902ee3736168180d4
parentc7e653a24c18f15be7169f217b5a91a63116d5f9
iommu/amd: make sure TLB to be flushed before IOVA freed

[ Upstream commit 3c120143f584360a13614787e23ae2cdcb5e5ccd ]

Although the mapping has already been removed in the page table, it maybe
still exist in TLB. Suppose the freed IOVAs is reused by others before the
flush operation completed, the new user can not correctly access to its
meomory.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Fixes: b1516a14657a ('iommu/amd: Implement flush queue')
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iommu/amd_iommu.c