[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [Patch RFC 09/13] vt-d: Put the page in Queued Invalidation(QI) interrupt handler if



the Device-TLB flush is completed.

Signed-off-by: Quan Xu <quan.xu@xxxxxxxxx>
---
 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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.