On Thu, 5 Dec 2024 14:26:54 +0200 Yishai Hadas <yishaih@xxxxxxxxxx> wrote: > 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: 79c3cf279926 ("vfio/mlx5: Init QP based resources for dirty tracking") > Reviewed-by: Cédric Le Goater <clg@xxxxxxxxxx> > Tested-by: Yingshun Cui <yicui@xxxxxxxxxx> > Signed-off-by: Yishai Hadas <yishaih@xxxxxxxxxx> > --- > Changes from V0: > https://lore.kernel.org/kvm/20241125113249.155127-1-yishaih@xxxxxxxxxx/T/ > > - Rename 'page_start' to 'kaddr' as was suggested by Cédric. > - Add the Tested-by and Reviewed-by clauses. > > drivers/vfio/pci/mlx5/cmd.c | 47 +++++++++++++++++++++++++++---------- > 1 file changed, 35 insertions(+), 12 deletions(-) Applied to vfio for-linus branch for v6.13-rc. Thanks, Alex