diff options
author | Eric Auger <eric.auger@linaro.org> | 2015-10-29 20:49:42 +0300 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2015-11-03 22:53:53 +0300 |
commit | 4644321fd3c119a819ab24fd2bc2d1f9bca4a695 (patch) | |
tree | 3188e61fff67f7233ca755d1b967ac835c413fc4 /drivers/usb | |
parent | 1276ece32c5d18790e8bcff89e692fd3c1790bab (diff) | |
download | linux-4644321fd3c119a819ab24fd2bc2d1f9bca4a695.tar.xz |
vfio/type1: handle case where IOMMU does not support PAGE_SIZE size
Current vfio_pgsize_bitmap code hides the supported IOMMU page
sizes smaller than PAGE_SIZE. As a result, in case the IOMMU
does not support PAGE_SIZE page, the alignment check on map/unmap
is done with larger page sizes, if any. This can fail although
mapping could be done with pages smaller than PAGE_SIZE.
This patch modifies vfio_pgsize_bitmap implementation so that,
in case the IOMMU supports page sizes smaller than PAGE_SIZE
we pretend PAGE_SIZE is supported and hide sub-PAGE_SIZE sizes.
That way the user will be able to map/unmap buffers whose size/
start address is aligned with PAGE_SIZE. Pinning code uses that
granularity while iommu driver can use the sub-PAGE_SIZE size
to map the buffer.
Signed-off-by: Eric Auger <eric.auger@linaro.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/usb')
0 files changed, 0 insertions, 0 deletions