From: Quan Xu Subject: [Patch RFC 09/13] vt-d: Put the page in Queued Invalidation(QI) interrupt handler if Date: Wed, 16 Sep 2015 09:24:03 -0400 Message-ID: <1442409847-65383-10-git-send-email-quan.xu@intel.com> References: <1442409847-65383-1-git-send-email-quan.xu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1442409847-65383-1-git-send-email-quan.xu@intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: andrew.cooper3@citrix.com, eddie.dong@intel.com, ian.campbell@citrix.com, ian.jackson@eu.citrix.com, jbeulich@suse.com, jun.nakajima@intel.com, keir@xen.org, kevin.tian@intel.com, tim@xen.org, yang.z.zhang@intel.com, george.dunlap@eu.citrix.com Cc: Quan Xu , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org the Device-TLB flush is completed. Signed-off-by: Quan Xu --- xen/drivers/passthrough/vtd/iommu.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c index 5c03e41..1297dea 100644 --- a/xen/drivers/passthrough/vtd/iommu.c +++ b/xen/drivers/passthrough/vtd/iommu.c @@ -1154,6 +1154,7 @@ static void _do_iommu_qi(struct iommu *iommu) { unsigned long nr_dom, i; struct domain *d = NULL; + struct page_info *page = NULL; scan_again: /* @@ -1177,6 +1178,15 @@ scan_again: { qi_table_data(d) = 0; qi_table_pollslot(d) = 0; + spin_lock(&qi_page_lock(d)); + while ( (page = page_list_remove_head( + &qi_hold_page_list(d))) ) + { + INTEL_IOMMU_DEBUG("IOMMU: Put page mfn : %"PRIx64"\n", + page_to_mfn(page)); + put_page(page); + } + spin_unlock(&qi_page_lock(d)); QI_FLUSHING(d) = 0; } rcu_unlock_domain(d); -- 1.8.3.2