From: Sasha Levin <sashal@kernel.org> To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Sasha Levin <sashal@kernel.org>, Filippo Sironi <sironi@amazon.de>, iommu@lists.linux-foundation.org, Joerg Roedel <jroedel@suse.de> Subject: [PATCH AUTOSEL 4.19 560/671] iommu/amd: Wait for completion of IOTLB flush in attach_device Date: Thu, 16 Jan 2020 12:03:18 -0500 Message-ID: <20200116170509.12787-297-sashal@kernel.org> (raw) In-Reply-To: <20200116170509.12787-1-sashal@kernel.org> From: Filippo Sironi <sironi@amazon.de> [ Upstream commit 0b15e02f0cc4fb34a9160de7ba6db3a4013dc1b7 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org> --- drivers/iommu/amd_iommu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 9991386fb700..bea19aa33758 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -2153,6 +2153,8 @@ static int attach_device(struct device *dev, */ domain_flush_tlb_pde(domain); + domain_flush_complete(domain); + return ret; } -- 2.20.1 _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
prev parent reply index Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <20200116170509.12787-1-sashal@kernel.org> 2020-01-16 16:59 ` [PATCH AUTOSEL 4.19 329/671] iommu/vt-d: Make kernel parameter igfx_off work with vIOMMU Sasha Levin 2020-01-16 17:00 ` [PATCH AUTOSEL 4.19 381/671] iommu: Add missing new line for dma type Sasha Levin 2020-01-16 17:00 ` [PATCH AUTOSEL 4.19 382/671] iommu: Use right function to get group for device Sasha Levin 2020-01-16 17:00 ` [PATCH AUTOSEL 4.19 405/671] iommu/vt-d: Duplicate iommu_resv_region objects per device list Sasha Levin 2020-01-16 17:01 ` [PATCH AUTOSEL 4.19 442/671] iommu/amd: Make iommu_disable safer Sasha Levin 2020-01-16 17:02 ` [PATCH AUTOSEL 4.19 510/671] iommu/mediatek: Fix iova_to_phys PA start for 4GB mode Sasha Levin 2020-01-16 17:03 ` Sasha Levin [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200116170509.12787-297-sashal@kernel.org \ --to=sashal@kernel.org \ --cc=iommu@lists.linux-foundation.org \ --cc=jroedel@suse.de \ --cc=linux-kernel@vger.kernel.org \ --cc=sironi@amazon.de \ --cc=stable@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
IOMMU Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/linux-iommu/0 linux-iommu/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 linux-iommu linux-iommu/ https://lore.kernel.org/linux-iommu \ iommu@lists.linux-foundation.org public-inbox-index linux-iommu Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.linux-foundation.lists.iommu AGPL code for this site: git clone https://public-inbox.org/public-inbox.git