Skip to content
Commit c99e6b26 authored by Joao Martins's avatar Joao Martins Committed by Greg Kroah-Hartman
Browse files

iommufd/iova_bitmap: Consider page offset for the pages to be pinned

[ Upstream commit 4bbcbc6e ]

For small bitmaps that aren't PAGE_SIZE aligned *and* that are less than
512 pages in bitmap length, use an extra page to be able to cover the
entire range e.g. [1M..3G] which would be iterated more efficiently in a
single iteration, rather than two.

Fixes: b058ea3a

 ("vfio/iova_bitmap: refactor iova_bitmap_set() to better handle page boundaries")
Link: https://lore.kernel.org/r/20240202133415.23819-10-joao.m.martins@oracle.com
Signed-off-by: default avatarJoao Martins <joao.m.martins@oracle.com>
Tested-by: default avatarAvihai Horon <avihaih@nvidia.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 929766da
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment