]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: guest_memfd: Rename "struct kvm_gmem" to "struct gmem_file"
authorSean Christopherson <seanjc@google.com>
Thu, 16 Oct 2025 17:28:42 +0000 (10:28 -0700)
committerSean Christopherson <seanjc@google.com>
Mon, 20 Oct 2025 13:30:38 +0000 (06:30 -0700)
commit497b1dfbcacf4e45c9cd3f594959918ca0e4536b
treed5743ac1520c9d2258f30fae26d59b8a04802fd3
parent5f3e10797ab883e9dcc256f21094f039c2bb3143
KVM: guest_memfd: Rename "struct kvm_gmem" to "struct gmem_file"

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@google.com>
Tested-by: Ackerley Tng <ackerleytng@google.com>
Reviewed-by: Shivank Garg <shivankg@amd.com>
Tested-by: Shivank Garg <shivankg@amd.com>
Link: https://lore.kernel.org/r/20251016172853.52451-2-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
virt/kvm/guest_memfd.c