]> xenbits.xensource.com Git - xen.git/commitdiff
VT-d: fix TLB flushing in dma_pte_clear_one()
authorJan Beulich <jbeulich@suse.com>
Mon, 18 Nov 2013 12:55:55 +0000 (13:55 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 18 Nov 2013 12:55:55 +0000 (13:55 +0100)
The third parameter of __intel_iommu_iotlb_flush() is to indicate
whether the to be flushed entry was a present one. A few lines before,
we bailed if !dma_pte_present(*pte), so there's no need to check the
flag here again - we can simply always pass TRUE here.

This is XSA-78.

Suggested-by: Cheng Yueqiang <yqcheng.2008@phdis.smu.edu.sg>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/drivers/passthrough/vtd/iommu.c

index 97d5b5e746bcc4b4402e1dad0ef6dd0d22c3dc4c..76d0bfdbb5573508e2831fb13339755922f60d17 100644 (file)
@@ -646,7 +646,7 @@ static void dma_pte_clear_one(struct domain *domain, u64 addr)
     iommu_flush_cache_entry(pte, sizeof(struct dma_pte));
 
     if ( !this_cpu(iommu_dont_flush_iotlb) )
-        __intel_iommu_iotlb_flush(domain, addr >> PAGE_SHIFT_4K , 0, 1);
+        __intel_iommu_iotlb_flush(domain, addr >> PAGE_SHIFT_4K, 1, 1);
 
     unmap_vtd_domain_page(page);