diff options
author | Will Deacon <will.deacon@arm.com> | 2016-06-16 17:21:19 (GMT) |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2016-07-01 13:04:37 (GMT) |
commit | 7c6d90e2bb1a98b86d73b9e8ab4d97ed5507e37c (patch) | |
tree | 22bf6738ea995d27bf8033f9e6e6e078a192df16 /lib/crc-ccitt.c | |
parent | 112c898b59dd5cfd95ee30dfe7cc4fc11a6d484e (diff) | |
download | linux-7c6d90e2bb1a98b86d73b9e8ab4d97ed5507e37c.tar.xz |
iommu/io-pgtable-arm: Fix iova_to_phys for block entries
The implementation of iova_to_phys for the long-descriptor ARM
io-pgtable code always masks with the granule size when inserting the
low virtual address bits into the physical address determined from the
page tables. In cases where the leaf entry is found before the final
level of table (i.e. due to a block mapping), this results in rounding
down to the bottom page of the block mapping. Consequently, the physical
address range batching in the vfio_unmap_unpin is defeated and we end
up taking the long way home.
This patch fixes the problem by masking the virtual address with the
appropriate mask for the level at which the leaf descriptor is located.
The short-descriptor code already gets this right, so no change is
needed there.
Cc: <stable@vger.kernel.org>
Reported-by: Robin Murphy <robin.murphy@arm.com>
Tested-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'lib/crc-ccitt.c')
0 files changed, 0 insertions, 0 deletions