diff options
author | Joao Martins <joao.m.martins@oracle.com> | 2024-02-02 13:34:08 +0000 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2024-02-06 11:31:45 -0400 |
commit | d18411ec305728c6371806c4fb09be07016aad0b (patch) | |
tree | 22496564af0a18b7c7d3d48e7721b7a9fb0729eb /drivers/platform/olpc | |
parent | a4ab7dedaee0e39b15653c5fd0367e420739f7ef (diff) | |
download | linux-d18411ec305728c6371806c4fb09be07016aad0b.tar.gz linux-d18411ec305728c6371806c4fb09be07016aad0b.tar.bz2 linux-d18411ec305728c6371806c4fb09be07016aad0b.zip |
iommufd/iova_bitmap: Switch iova_bitmap::bitmap to an u8 array
iova_bitmap_mapped_length() don't deal correctly with the small bitmaps
(< 2M bitmaps) when the starting address isn't u64 aligned, leading to
skipping a tiny part of the IOVA range. This is materialized as not
marking data dirty that should otherwise have been.
Fix that by using a u8 * in the internal state of IOVA bitmap. Most of the
data structures use the type of the bitmap to adjust its indexes, thus
changing the type of the bitmap decreases the granularity of the bitmap
indexes.
Fixes: b058ea3ab5af ("vfio/iova_bitmap: refactor iova_bitmap_set() to better handle page boundaries")
Link: https://lore.kernel.org/r/20240202133415.23819-3-joao.m.martins@oracle.com
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Tested-by: Avihai Horon <avihaih@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/platform/olpc')
0 files changed, 0 insertions, 0 deletions