linux/drivers/infiniband/hw
Edward Srouji 5beca7388b RDMA/mlx5: Fix page size bitmap calculation for KSM mode
[ Upstream commit 372fdb5c75 ]

When using KSM (Key Scatter-gather Memory) access mode, the HW requires
the IOVA to be aligned to the selected page size.
Without this alignment, the HW may not function correctly.

Currently, mlx5_umem_mkc_find_best_pgsz() does not filter out page sizes
that would result in misaligned IOVAs for KSM mode. This can lead to
selecting page sizes that are incompatible with the given IOVA.

Fix this by filtering the page size bitmap when in KSM mode, keeping
only page sizes to which the IOVA is aligned to.

Fixes: fcfb03597b ("RDMA/mlx5: Align mkc page size capability check to PRM")
Signed-off-by: Edward Srouji <edwards@nvidia.com>
Link: https://patch.msgid.link/20250824144839.154717-1-edwards@nvidia.com
Reviewed-by: Michael Guralnik <michaelgur@nvidia.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-10-15 12:03:56 +02:00
..
bnxt_re RDMA/bnxt_re: Fix to initialize the PBL array 2025-08-13 06:35:40 -04:00
cxgb4 IB: Extend UVERBS_METHOD_REG_MR to get DMAH 2025-07-23 01:42:11 -04:00
efa IB: Extend UVERBS_METHOD_REG_MR to get DMAH 2025-07-23 01:42:11 -04:00
erdma RDMA/erdma: Fix unset QPN of GSI QP 2025-08-13 06:23:54 -04:00
hfi1 RDMA v6.17 merge window pull request 2025-07-31 12:19:55 -07:00
hns RDMA/hns: Fix dip entries leak on devices newer than hip09 2025-08-13 07:22:18 -04:00
irdma IB: Extend UVERBS_METHOD_REG_MR to get DMAH 2025-07-23 01:42:11 -04:00
mana RDMA/mana_ib: add support of multiple ports 2025-07-23 04:31:11 -04:00
mlx4 IB: Extend UVERBS_METHOD_REG_MR to get DMAH 2025-07-23 01:42:11 -04:00
mlx5 RDMA/mlx5: Fix page size bitmap calculation for KSM mode 2025-10-15 12:03:56 +02:00
mthca IB: Extend UVERBS_METHOD_REG_MR to get DMAH 2025-07-23 01:42:11 -04:00
ocrdma IB: Extend UVERBS_METHOD_REG_MR to get DMAH 2025-07-23 01:42:11 -04:00
qedr IB: Extend UVERBS_METHOD_REG_MR to get DMAH 2025-07-23 01:42:11 -04:00
usnic IB: Extend UVERBS_METHOD_REG_MR to get DMAH 2025-07-23 01:42:11 -04:00
vmw_pvrdma IB: Extend UVERBS_METHOD_REG_MR to get DMAH 2025-07-23 01:42:11 -04:00
Makefile RDMA/qib: Remove outdated driver 2025-06-17 14:05:53 -03:00