Re: [PATCH v4 01/11] liveupdate: Add LIVEUPDATE_GUEST_MEMFD config option
Sean Christopherson <[email protected]>
| Newsgroups | org.infradead.lists.kexec,dev.linux.lists.kvmarm,org.kernel.vger.kvm,org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel,org.kernel.vger.linux-kselftest,org.kvack.linux-mm |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Aug 11, 2026, [email protected] wrote: > Sean Christopherson <[email protected]> writes: > > > On Tue, Jul 28, 2026, Tarun Sahu wrote: > >> 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 > >> (INIT_SHARED and no support for private_mem). > > > > Why? Specifically, why do we need/want a separate Kconfig for guest_memfd > > liveupdate versus KVM liveupdate? I can _maybe_ see a KVM-wide Kconfig, but > > even that seems like a stretch given that (AFAIK) hypervisors are the one and > > only use-case for liveupdate. > > LIVEUPDATE is used in many subsystem. It is possible to enable > liveupdate and kvm without enabling KVM_GUEST_MEMFD. So GUEST_MEMFD > preservation must depend on CONFIG_LIVEUPDATE and KVM_GUEST_MEMFD both. > LIVEUPDATE_GUEST_MEMFD Kconfig is wrapper on both of them. It need not > to be visible in menu, So I can make it hidden. WDYT? > > Also, KVM VM_FILE preservation and GUEST_MEMFD preservation both depends > on LIVEUPDATE_GUEST_MEMFD in this patch series. [PATCH 05/11]* > Which is wrong. So I will update KVM VM_FILE preservation to depend only > on CONFIG_LIVEUPDATE. Or just handle it all in the makefile? E.g. diff --git virt/kvm/Makefile.kvm virt/kvm/Makefile.kvm index d047d4cf58c9..e6f098498795 100644 --- virt/kvm/Makefile.kvm +++ virt/kvm/Makefile.kvm @@ -13,3 +13,8 @@ kvm-$(CONFIG_HAVE_KVM_IRQ_ROUTING) += $(KVM)/irqchip.o kvm-$(CONFIG_HAVE_KVM_DIRTY_RING) += $(KVM)/dirty_ring.o kvm-$(CONFIG_HAVE_KVM_PFNCACHE) += $(KVM)/pfncache.o kvm-$(CONFIG_KVM_GUEST_MEMFD) += $(KVM)/guest_memfd.o + +ifdef CONFIG_LIVEUPDATE +kvm-y += $(KVM)/kvm_luo.o +kvm-$(CONFIG_KVM_GUEST_MEMFD) += $(KVM)/guest_memfd_luo.o +endif