iommu/vt-d: correct flush_unmaps pfn usage
authorOmer Peleg <omer@cs.technion.ac.il>
Wed, 20 Apr 2016 08:33:11 +0000 (11:33 +0300)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Wed, 20 Apr 2016 19:05:56 +0000 (15:05 -0400)
Change flush_unmaps() to correctly pass iommu_flush_iotlb_psi()
dma addresses.  (x86_64 mm and dma have the same size for pages
at the moment, but this usage improves consistency.)

Signed-off-by: Omer Peleg <omer@cs.technion.ac.il>
[mad@cs.technion.ac.il: rebased and reworded the commit message]
Signed-off-by: Adam Morrison <mad@cs.technion.ac.il>
Reviewed-by: Shaohua Li <shli@fb.com>
Reviewed-by: Ben Serebrin <serebrin@google.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/iommu/intel-iommu.c

index a64b6f3b9a669112f17ff84a8541b5dd74419976..6aacfa4eee2ad126b3ff4c2485902e6c79c2f707 100644 (file)
@@ -3548,7 +3548,8 @@ static void flush_unmaps(struct deferred_flush_data *flush_data)
                        /* On real hardware multiple invalidations are expensive */
                        if (cap_caching_mode(iommu->cap))
                                iommu_flush_iotlb_psi(iommu, domain,
-                                       iova->pfn_lo, iova_size(iova),
+                                       mm_to_dma_pfn(iova->pfn_lo),
+                                       mm_to_dma_pfn(iova_size(iova)),
                                        !freelist, 0);
                        else {
                                mask = ilog2(mm_to_dma_pfn(iova_size(iova)));
This page took 0.026033 seconds and 5 git commands to generate.