Commit 97c22fd5 authored by Yishai Hadas's avatar Yishai Hadas Committed by Greg Kroah-Hartman
Browse files

vfio/mlx5: Align the page tracking max message size with the device capability



[ Upstream commit 9c7c5430 ]

Align the page tracking maximum message size with the device's
capability instead of relying on PAGE_SIZE.

This adjustment resolves a mismatch on systems where PAGE_SIZE is 64K,
but the firmware only supports a maximum message size of 4K.

Now that we rely on the device's capability for max_message_size, we
must account for potential future increases in its value.

Key considerations include:
- Supporting message sizes that exceed a single system page (e.g., an 8K
  message on a 4K system).
- Ensuring the RQ size is adjusted to accommodate at least 4
  WQEs/messages, in line with the device specification.

The above has been addressed as part of the patch.

Fixes: 79c3cf27 ("vfio/mlx5: Init QP based resources for dirty tracking")
Reviewed-by: default avatarCédric Le Goater <clg@redhat.com>
Tested-by: default avatarYingshun Cui <yicui@redhat.com>
Signed-off-by: default avatarYishai Hadas <yishaih@nvidia.com>
Link: https://lore.kernel.org/r/20241205122654.235619-1-yishaih@nvidia.com


Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent ca8e6a73
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment