summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2026-07-23 14:08:09 -0700
committerSean Christopherson <seanjc@google.com>2026-07-27 09:42:42 -0700
commit2131c4f763d2e4cbbe5c227a406488c38e23f806 (patch)
tree81050f8a7b251618a72573da05d56a02436bdb99 /include/linux
parent3df611b5a04e916f406882a22f33b570831df404 (diff)
KVM: guest_memfd: Rename prepare() hook and Kconfig to make_private() / CONVERT
Rework guest_memfd's prepare() hook into a more accurate make_private(), and rework its Kconfig from PREPARE to a more generic CONVERT. This will allow x86 to share (pun intended) a kvm_x86_ops.gmem_make_shared() hook between the "convert to shared" and "reclaim" flows, which are one and the same for SNP. No functional change intended. Reviewed-by: Ackerley Tng <ackerleytng@google.com> Reviewed-by: Fuad Tabba <fuad.tabba@linux.dev> Link: https://patch.msgid.link/20260723210811.72720-8-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/kvm_host.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 46c8d18fd043..ecdda1f00c6c 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -2572,8 +2572,9 @@ static inline int kvm_gmem_get_pfn(struct kvm *kvm,
}
#endif /* CONFIG_KVM_GUEST_MEMFD */
-#ifdef CONFIG_HAVE_KVM_ARCH_GMEM_PREPARE
-int kvm_arch_gmem_prepare(struct kvm *kvm, gfn_t gfn, kvm_pfn_t pfn, int max_order);
+#ifdef CONFIG_HAVE_KVM_ARCH_GMEM_CONVERT
+int kvm_arch_gmem_make_private(struct kvm *kvm, gfn_t gfn, kvm_pfn_t pfn,
+ int max_order);
#endif
#ifdef CONFIG_HAVE_KVM_ARCH_GMEM_POPULATE