linux/drivers/vfio/pci
Yishai Hadas ad4095d125 vfio/mlx5: Align the page tracking max message size with the device capability
[ Upstream commit 9c7c5430bc ]

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: 79c3cf2799 ("vfio/mlx5: Init QP based resources for dirty tracking")
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Tested-by: Yingshun Cui <yicui@redhat.com>
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Link: https://lore.kernel.org/r/20241205122654.235619-1-yishaih@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2024-12-14 20:04:14 +01:00
..
hisilicon [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
mlx5 vfio/mlx5: Align the page tracking max message size with the device capability 2024-12-14 20:04:14 +01:00
nvgrace-gpu vfio/nvgrace-gpu: Convey kvm to map device memory region as noncached 2024-03-04 16:11:06 -07:00
pds [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
qat vfio/qat: fix overflow check in qat_vf_resume_write() 2024-12-09 10:41:04 +01:00
virtio vfio/pci: rename and export range_intersect_range 2024-02-22 12:20:20 -07:00
Kconfig vfio/qat: Add vfio_pci driver for Intel QAT SR-IOV VF devices 2024-04-29 13:25:41 -06:00
Makefile vfio/qat: Add vfio_pci driver for Intel QAT SR-IOV VF devices 2024-04-29 13:25:41 -06:00
trace.h vfio/pci: Cleanup license mess 2019-01-22 11:06:05 -07:00
vfio_pci.c VFIO: Add the SPR_DSA and SPR_IAX devices to the denylist 2024-05-13 14:07:33 +00:00
vfio_pci_config.c vfio/pci: Properly hide first-in-list PCIe extended capability 2024-12-05 14:02:29 +01:00
vfio_pci_core.c VFIO updates for v6.12 2024-09-24 12:07:47 -07:00
vfio_pci_igd.c vfio: Use GFP_KERNEL_ACCOUNT for userspace persistent allocations 2023-01-23 11:26:29 -07:00
vfio_pci_intrs.c vfio/pci: fix potential memory leak in vfio_intx_enable() 2024-04-22 16:52:08 -06:00
vfio_pci_priv.h vfio/pci: Mask INTx during runtime suspend 2022-09-01 15:29:11 -06:00
vfio_pci_rdwr.c vfio/pci: Support 8-byte PCI loads and stores 2024-06-21 12:47:01 -06:00
vfio_pci_zdev.c Merge remote-tracking branch 'mlx5/mlx5-vfio' into v6.1/vfio/next 2022-09-08 10:44:34 -06:00