android_kernel_google_msm/drivers/iommu
Alex Williamson ca9c5a9c9b iommu/amd: Only unmap large pages from the first pte
commit 60d0ca3cfd upstream.

If we use a large mapping, the expectation is that only unmaps from
the first pte in the superpage are supported.  Unmaps from offsets
into the superpage should fail (ie. return zero sized unmap).  In the
current code, unmapping from an offset clears the size of the full
mapping starting from an offset.  For instance, if we map a 16k
physically contiguous range at IOVA 0x0 with a large page, then
attempt to unmap 4k at offset 12k, 4 ptes are cleared (12k - 28k) and
the unmap returns 16k unmapped.  This potentially incorrectly clears
valid mappings and confuses drivers like VFIO that use the unmap size
to release pinned pages.

Fix by refusing to unmap from offsets into the page.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-28 16:25:47 -07:00
..
amd_iommu.c iommu/amd: Only unmap large pages from the first pte 2013-07-28 16:25:47 -07:00
amd_iommu_init.c iommu/amd: Initialize device table after dma_ops 2013-03-04 06:06:37 +08:00
amd_iommu_proto.h
amd_iommu_types.h iommu/amd: Re-enable IOMMU event log interrupt after handling. 2013-06-07 12:49:35 -07:00
amd_iommu_v2.c iommu/amd: Add missing spin_lock initialization 2012-08-09 08:31:31 -07:00
dmar.c
intel-iommu.c intel/iommu: force writebuffer-flush quirk on Gen 4 Chipsets 2013-02-28 06:59:03 -08:00
intr_remapping.c irq_remap: disable IRQ remapping if any IOAPIC lacks an IOMMU 2012-10-02 10:30:38 -07:00
intr_remapping.h
iommu.c
iova.c
Kconfig
Makefile
msm_iommu.c
msm_iommu_dev.c
omap-iommu-debug.c
omap-iommu.c
omap-iovmm.c
tegra-gart.c
tegra-smmu.c iommu/tegra: smmu: Fix deadly typo 2012-10-28 10:14:15 -07:00