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

[Xen-changelog] [xen master] VT-d: make flush-all actually flush all



commit fd3102e5d29cd07682e8c507134112225b63b189
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Thu Dec 10 13:17:49 2015 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Dec 10 13:17:49 2015 +0100

    VT-d: make flush-all actually flush all

    Passing gfn=0 and page_count=0 actually avoids the
    iommu_flush_iotlb_dsi() and results in page-specific invalidation
    instead.

    Reported-by: "å¼ æ?º" <zhangzhi2014@xxxxxxx>
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Acked-by: Feng Wu <feng.wu@xxxxxxxxx>
---
 xen/drivers/passthrough/vtd/iommu.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/xen/drivers/passthrough/vtd/iommu.c 
b/xen/drivers/passthrough/vtd/iommu.c
index 1d17769..065f239 100644
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -583,7 +583,7 @@ static void __intel_iommu_iotlb_flush(struct domain *d, 
unsigned long gfn,
         if ( iommu_domid == -1 )
             continue;

-        if ( page_count > 1 || gfn == -1 )
+        if ( page_count != 1 || gfn == INVALID_GFN )
         {
             if ( iommu_flush_iotlb_dsi(iommu, iommu_domid,
                         0, flush_dev_iotlb) )
@@ -592,7 +592,7 @@ static void __intel_iommu_iotlb_flush(struct domain *d, 
unsigned long gfn,
         else
         {
             if ( iommu_flush_iotlb_psi(iommu, iommu_domid,
-                        (paddr_t)gfn << PAGE_SHIFT_4K, 0,
+                        (paddr_t)gfn << PAGE_SHIFT_4K, PAGE_ORDER_4K,
                         !dma_old_pte_present, flush_dev_iotlb) )
                 iommu_flush_write_buffer(iommu);
         }
@@ -606,7 +606,7 @@ static void intel_iommu_iotlb_flush(struct domain *d, 
unsigned long gfn, unsigne

 static void intel_iommu_iotlb_flush_all(struct domain *d)
 {
-    __intel_iommu_iotlb_flush(d, 0, 0, 0);
+    __intel_iommu_iotlb_flush(d, INVALID_GFN, 0, 0);
 }

 /* clear one page's page table */
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

 


Rackspace

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