linux-stable/drivers/vfio
Joao Martins 47e93d2f28 iommufd/iova_bitmap: Consider page offset for the pages to be pinned
[ Upstream commit 4bbcbc6ea2 ]

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: b058ea3ab5 ("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: Joao Martins <joao.m.martins@oracle.com>
Tested-by: Avihai Horon <avihaih@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-01 13:26:35 +01:00
..
fsl-mc
mdev vfio/mdev: Fix a null-ptr-deref bug for mdev_unregister_parent() 2023-10-06 14:56:45 +02:00
pci
platform
container.c
iova_bitmap.c iommufd/iova_bitmap: Consider page offset for the pages to be pinned 2024-03-01 13:26:35 +01:00
Kconfig
Makefile
vfio.h
vfio_iommu_spapr_tce.c
vfio_iommu_type1.c vfio/type1: fix cap_migration information leak 2023-09-13 09:42:47 +02:00
vfio_main.c
vfio_spapr_eeh.c
virqfd.c