On Sun, Jan 08, 2023 at 05:44:21PM +0200, Yishai Hadas wrote: > This series changes the vfio and its sub drivers to use > GFP_KERNEL_ACCOUNT for userspace persistent allocations. > > 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 accountingis, and as such it is controlled by the cgroup > mechanism. [1] > > As part of this change, we allow loading in mlx5 driver 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. > > In addition, the first patch from the series fixes a UBSAN note in mlx5 > that was reported once the kernel was compiled with this option. > > [1] https://www.kernel.org/doc/html/latest/core-api/memory-allocation.html > > Changes from V0: https://www.spinics.net/lists/kvm/msg299508.html > Patch #2 - Fix MAX_LOAD_SIZE to use BIT_ULL instead of BIT as was > reported by the krobot test. > > Yishai > > Jason Gunthorpe (1): > vfio: Use GFP_KERNEL_ACCOUNT for userspace persistent allocations > > Yishai Hadas (5): > vfio/mlx5: Fix UBSAN note > vfio/mlx5: Allow loading of larger images than 512 MB > vfio/hisi: Use GFP_KERNEL_ACCOUNT for userspace persistent allocations > vfio/fsl-mc: Use GFP_KERNEL_ACCOUNT for userspace persistent > allocations > vfio/platform: Use GFP_KERNEL_ACCOUNT for userspace persistent > allocations Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx> Jason