mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joerg Roedel <joro@8bytes.org>
To: iommu@lists.linux-foundation.org,
	Alex Williamson <alex.williamson@redhat.com>
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Joerg Roedel <jroedel@suse.de>,
	stable@vger.kernel.org, #@8bytes.org, =@8bytes.org,
	2.6.33@8bytes.org
Subject: [PATCH 1/4] iommu/amd: Finish TLB flush in amd_iommu_unmap()
Date: Fri, 13 Oct 2017 16:40:10 +0200	[thread overview]
Message-ID: <1507905613-30695-2-git-send-email-joro@8bytes.org> (raw)
In-Reply-To: <1507905613-30695-1-git-send-email-joro@8bytes.org>

From: Joerg Roedel <jroedel@suse.de>

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>
---
 drivers/iommu/amd_iommu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index cb7c531..3a702c4 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -3046,6 +3046,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;
 }
-- 
2.7.4

  reply	other threads:[~2017-10-13 14:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-13 14:40 [PATCH 0/4] iommu/amd, vfio: Reduce IOTLB Flushm Rate Joerg Roedel
2017-10-13 14:40 ` Joerg Roedel [this message]
2017-10-13 14:40 ` [PATCH 2/4] iommu/amd: Implement IOMMU-API TLB flush interface Joerg Roedel
2017-10-13 14:40 ` [PATCH 3/4] vfio/type1: Make use of iommu_unmap_fast() Joerg Roedel
2017-10-13 14:40 ` [PATCH 4/4] vfio/type1: Gather TLB-syncs and pages to unpin Joerg Roedel
2017-10-13 17:02   ` Alex Williamson

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=1507905613-30695-2-git-send-email-joro@8bytes.org \
    --to=joro@8bytes.org \
    --cc=#@8bytes.org \
    --cc=2.6.33@8bytes.org \
    --cc==@8bytes.org \
    --cc=alex.williamson@redhat.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jroedel@suse.de \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=suravee.suthikulpanit@amd.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome