[PATCH v13 01/12] KVM: guest_memfd: Rename "struct kvm_gmem" to "struct gmem_file"

Garg, Shivank shivankg at amd.com
Fri Oct 17 02:31:02 PDT 2025



On 10/16/2025 10:58 PM, Sean Christopherson wrote:
> Rename the "kvm_gmem" structure to "gmem_file" in anticipation of using
> dedicated guest_memfd inodes instead of anonyomous inodes, at which point
> the "kvm_gmem" nomenclature becomes quite misleading.  In guest_memfd,
> inodes are effectively the raw underlying physical storage, and will be
> used to track properties of the physical memory, while each gmem file is
> effectively a single VM's view of that storage, and is used to track assets
> specific to its associated VM, e.g. memslots=>gmem bindings.
> 
> Using "kvm_gmem" suggests that the per-VM/per-file structures are _the_
> guest_memfd instance, which almost the exact opposite of reality.
> 
> Opportunistically rename local variables from "gmem" to "f", again to
> avoid confusion once guest_memfd specific inodes come along.
> 
> No functional change intended.
> 
> Reviewed-by: Ackerley Tng <ackerleytng at google.com>
> Tested-by: Ackerley Tng <ackerleytng at google.com>
> Reviewed-by: Shivank Garg <shivankg at amd.com>
> Signed-off-by: Sean Christopherson <seanjc at google.com>
> ---
>  virt/kvm/guest_memfd.c | 98 +++++++++++++++++++++++-------------------
>  1 file changed, 53 insertions(+), 45 deletions(-)
> 

Tested-by: Shivank Garg <shivankg at amd.com>




More information about the linux-arm-kernel mailing list