Introduce the LIVEUPDATE_GUEST_MEMFD Kconfig option. This option
enables live update support for KVM guest_memfd files, enabling
guest_memfd-backed memory preservation across kernel upgrades.

Currently this support only guest_memfd files that are full-shared
and pre-faulted.

Signed-off-by: Tarun Sahu <[email protected]>
---
 kernel/liveupdate/Kconfig | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/kernel/liveupdate/Kconfig b/kernel/liveupdate/Kconfig
index 1a8513f16ef7..0bbc4037192e 100644
--- a/kernel/liveupdate/Kconfig
+++ b/kernel/liveupdate/Kconfig
@@ -88,4 +88,19 @@ config LIVEUPDATE_MEMFD
 
          If unsure, say N.
 
+config LIVEUPDATE_GUEST_MEMFD
+       bool "Live update support for guest_memfd"
+       depends on LIVEUPDATE
+       depends on KVM_GUEST_MEMFD
+       default LIVEUPDATE
+       help
+         Enable live update support for KVM guest_memfd files. This allows
+         preserving VM Memory backed by guest_memfd file across kernel live
+         updates.
+
+         This can only be used for the guest_memfd that are fully-shared
+         and pre-faulted.
+
+         If unsure, say N.
+
 endmenu
-- 
2.54.0.563.g4f69b47b94-goog


Reply via email to