]> www.infradead.org Git - users/jedix/linux-maple.git/commit
intel-iommu: fix superpage support in pfn_to_dma_pte()
authorAllen Kay <allen.m.kay@intel.com>
Fri, 14 Oct 2011 19:32:46 +0000 (12:32 -0700)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Tue, 10 Jan 2012 21:00:12 +0000 (13:00 -0800)
commit77a16758fff5a270630c6b2b0d64c0b82023123d
tree98e995061d0f1017e5afabbec11c79257b6ba4b3
parent07cd6662edc7896d25a6a6c3d205da13cebed613
intel-iommu: fix superpage support in pfn_to_dma_pte()

commit 4399c8bf2b9093696fa8160d79712e7346989c46 upstream.

If target_level == 0, current code breaks out of the while-loop if
SUPERPAGE bit is set. We should also break out if PTE is not present.
If we don't do this, KVM calls to iommu_iova_to_phys() will cause
pfn_to_dma_pte() to create mapping for 4KiB pages.

Signed-off-by: Allen Kay <allen.m.kay@intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Youquan Song <youquan.song@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/pci/intel-iommu.c