Re: [RFC PATCH 2/5] KVM: guest_memfd: Move gmem function declarations to dedicated guest_memfd.h

Ackerley Tng
2026-04-30T19:07:07Z

Sean Christopherson <seanjc@google.com> writes:

> Extract the gmem function declarations out of kvm_mm.h and into a dedicated
> header, guest_memfd.h. This will allow creating a MAINTAINERS entry for
> guest_memfd without having to rely on content pattern matching.
>

This also trims kvm_mm.h, which makes it easier to look stuff
up. Thanks!

Shall we do something similar for include/linux/kvm_host.h?

Reviewed-by: Ackerley Tng <ackerleytng@google.com>

> Signed-off-by: Sean Christopherson <seanjc@google.com>
> ---
> virt/kvm/guest_memfd.c | 1 +
> virt/kvm/guest_memfd.h | 34 ++++++++++++++++++++++++++++++++++
> virt/kvm/kvm_main.c | 1 +
> virt/kvm/kvm_mm.h | 27 ---------------------------
> 4 files changed, 36 insertions(+), 27 deletions(-)
> create mode 100644 virt/kvm/guest_memfd.h
>
>
> [...snip...]
>