Commit a83f4522 authored by Filippo Sironi's avatar Filippo Sironi Committed by Kleber Sacilotto de Souza

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

BugLink: https://bugs.launchpad.net/bugs/1864773

[ Upstream commit 0b15e02f ]

To make sure the domain tlb flush completes before the
function returns, explicitly wait for its completion.
Signed-off-by: default avatarFilippo Sironi <sironi@amazon.de>
Fixes: 42a49f96 ("amd-iommu: flush domain tlb when attaching a new device")
[joro: Added commit message and fixes tag]
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 446001f7
...@@ -2184,6 +2184,8 @@ static int attach_device(struct device *dev, ...@@ -2184,6 +2184,8 @@ static int attach_device(struct device *dev,
*/ */
domain_flush_tlb_pde(domain); domain_flush_tlb_pde(domain);
domain_flush_complete(domain);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment