Commit 8f859b27 authored by Artemy Kovalyov's avatar Artemy Kovalyov Committed by Greg Kroah-Hartman
Browse files

IB/mlx5: Fix page fault handling for MW

[ Upstream commit 75b7b86b ]

Memory windows are implemented with an indirect MKey, when a page fault
event comes for a MW Mkey we need to find the MR at the end of the list of
the indirect MKeys by iterating on all items from the first to the last.

The offset calculated during this process has to be zeroed after the first
iteration or the next iteration will start from a wrong address, resulting
incorrect ODP faulting behavior.

Fixes: db570d7d

 ("IB/mlx5: Add ODP support to MW")
Signed-off-by: default avatarArtemy Kovalyov <>
Signed-off-by: default avatarMoni Shoua <>
Signed-off-by: default avatarLeon Romanovsky <>
Signed-off-by: default avatarJason Gunthorpe <>
Signed-off-by: default avatarSasha Levin <>
parent 97f04803
......@@ -723,6 +723,7 @@ static int pagefault_single_data_segment(struct mlx5_ib_dev *dev,
head = frame;
bcnt -= frame->bcnt;
offset = 0;
Markdown is supported
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