diff mbox series

[gmem,1/6] KVM: guest_memfd: Fix stub for kvm_gmem_get_uninit_pfn()

Message ID 20240329212444.395559-2-michael.roth@amd.com (mailing list archive)
State New, archived
Headers show
Series gmem fix-ups and interfaces for populating gmem pages | expand

Commit Message

Michael Roth March 29, 2024, 9:24 p.m. UTC
The stub needs to return an integer in order to avoid breakage when
CONFIG_KVM_PRIVATE_MEM is not set. Add it.

Signed-off-by: Michael Roth <michael.roth@amd.com>
---
 include/linux/kvm_host.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 73638779974a..2f5074eff958 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -2459,7 +2459,9 @@  static inline int kvm_gmem_get_uninit_pfn(struct kvm *kvm,
 static inline int kvm_gmem_undo_get_pfn(struct kvm *kvm,
 				        struct kvm_memory_slot *slot, gfn_t gfn,
 				        int order)
-{}
+{
+	return -EIO;
+}
 #endif /* CONFIG_KVM_PRIVATE_MEM */
 
 #ifdef CONFIG_HAVE_KVM_GMEM_PREPARE