[PATCH v12 04/12] KVM: guest_memfd: Add slab-allocated inode cache
Ackerley Tng
ackerleytng at google.com
Thu Oct 9 14:39:07 PDT 2025
Sean Christopherson <seanjc at google.com> writes:
> From: Shivank Garg <shivankg at amd.com>
>
> Add a dedicated gmem_inode structure and a slab-allocateda inode cache for
> guest memory backing, similar to how shmem handles inodes.
>
> This adds the necessary allocation/destruction functions and prepares
> for upcoming guest_memfd NUMA policy support changes. Using a dedicated
> structure will also allow for additional cleanups, e.g. to track flags in
> gmem_inode instead of i_private.
>
> Signed-off-by: Shivank Garg <shivankg at amd.com>
> Tested-by: Ashish Kalra <ashish.kalra at amd.com>
> [sean: s/kvm_gmem_inode_info/gmem_inode, name init_once()]
> Signed-off-by: Sean Christopherson <seanjc at google.com>
Reviewed-by: Ackerley Tng <ackerleytng at google.com>
Tested-by: Ackerley Tng <ackerleytng at google.com>
> ---
> virt/kvm/guest_memfd.c | 77 +++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 76 insertions(+), 1 deletion(-)
>
>
> [...snip...]
>
More information about the linux-arm-kernel
mailing list