linux-stable/drivers/vfio/pci/mlx5
Yishai Hadas 83ff6095ec vfio/mlx5: Allow loading of larger images than 512 MB
Allow loading of larger images than 512 MB by dropping the arbitrary
hard-coded value that we have today and move to use the max device
loading value which is for now 4GB.

As part of that we move to use the GFP_KERNEL_ACCOUNT option upon
allocating the persistent data of mlx5 and rely on the cgroup to provide
the memory limit for the given user.

The GFP_KERNEL_ACCOUNT option lets the memory allocator know that this
is untrusted allocation triggered from userspace and should be a subject
of kmem accounting, and as such it is controlled by the cgroup
mechanism.

Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20230108154427.32609-3-yishaih@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2023-01-23 11:26:29 -07:00
..
cmd.c vfio/mlx5: Allow loading of larger images than 512 MB 2023-01-23 11:26:29 -07:00
cmd.h vfio/mlx5: Fallback to STOP_COPY upon specific PRE_COPY error 2022-12-06 12:36:44 -07:00
Kconfig
main.c vfio/mlx5: Allow loading of larger images than 512 MB 2023-01-23 11:26:29 -07:00
Makefile