aboutsummaryrefslogtreecommitdiffstats
path: root/samples/hw_breakpoint
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2013-06-21 16:33:19 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-25 17:07:42 -0400
commited2f079599f3d9e5e27a516771d3d53afa7e7773 (patch)
tree745e9c333829ab3e37d4d698cc7fb095510c806f /samples/hw_breakpoint
parent64dd8fc12c34e39e82b77109bb5b328ad5b24268 (diff)
iommu/amd: Only unmap large pages from the first pte
commit 60d0ca3cfd199b6612bbbbf4999a3470dad38bb1 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>
Diffstat (limited to 'samples/hw_breakpoint')
0 files changed, 0 insertions, 0 deletions