Kernel KVM virtualization development
 help / color / mirror / Atom feed
* [PATCH v3 0/9] liveupdate: kvm: guest_memfd preservation
@ 2026-06-22 18:48 Tarun Sahu
  2026-06-22 18:48 ` [PATCH v3 1/9] liveupdate: Add LIVEUPDATE_GUEST_MEMFD config option Tarun Sahu
                   ` (9 more replies)
  0 siblings, 10 replies; 18+ messages in thread
From: Tarun Sahu @ 2026-06-22 18:48 UTC (permalink / raw)
  To: Jonathan Corbet, Mike Rapoport, Paolo Bonzini, Alexander Graf,
	Shuah Khan, Pratyush Yadav, Tarun Sahu, Pasha Tatashin
  Cc: kvm, linux-mm, kexec, linux-doc, linux-kselftest, linux-kernel

Hello,
This is Non-RFC patch series for guest_memfd preservation. After
having multiple discussion across hypervisor liveupdate meeting,
guest_memfd bi-weekly meeting, the design for the basic support of
guest_memfd preservation is final. This series is going to include
guest_memfd which are fully shared and does not support private mem
and backed by PAGE_SIZE pages.

Steps to test:
1. Compile Kernel with CONFIG_LIVEUPDATE_GUEST_MEMFD=y
2. boot kernel with command line: kho=on liveupdate=on
3. run the following kselftest
	$ .selftests/kvm/guest_memfd_preservation_test --stage 1
	$ <kexec> --reuse-cmdline
	$ .selftests/kvm/guest_memfd_preservation_test --stage 2

NOTE: Assert the following:
	$ ls /dev/liveupdate
	$ ls /dev/kvm
	$ dmesg | grep liveupdate # (should have kvm_vm_luo &&
		# guest_memfd_luo handler registered)

The changes are rebased on:
	kvm/next + liveupdate/next (merge) + [3] + [4] + [5]
	Where,
	[3]: luo: conversion of serialized_data to KHOSER_PTR
	[4]: luo: APIs to retrieve file internally from session
	[5]: selftests: liveupdate sefltests library
Here is the github repo:
	https://github.com/tar-unix/linux/tree/gmem-pre

V3 <- RFC V2 [2]
1. Finalize the design
2. resolve sashiko reported bugs
3. Use of KHOSER_PTR instead of raw serialized_data as per [3]

RFC V2 [2] <- RFC V1 [1]
1. Removed mem_attr_array as it is not needed for fully-shared
2. Removed pre-faulted condition
3. Added vm_type preservation for ARM64.
4. Removed liveupdate_get_file_incoming api patch as it is sent
   separately [4] by Samiullah.

[1] https://lore.kernel.org/all/cover.1779080766.git.tarunsahu@google.com/
[2] https://lore.kernel.org/all/c054ba0fb2639932bbe354420d3f4f84cce84905.1780676742.git.tarunsahu@google.com/
[3] https://lore.kernel.org/all/20260622111215.4157974-1-tarunsahu@google.com/
[4] https://lore.kernel.org/all/20260613012521.835490-1-skhawaja@google.com/
[5] https://lore.kernel.org/all/20260612214512.464146-1-vipinsh@google.com/

Tarun Sahu (9):
  liveupdate: Add LIVEUPDATE_GUEST_MEMFD config option
  kvm: Prepare core VM structs and helpers for LUO support
  kvm: kvm_luo: Allow kvm preservation with LUO
  kvm: guest_memfd: Move internal definitions and helper to new header
  kvm: guest_memfd: Add support for freezing and unfreezing mappings
  kvm: guest_memfd_luo: add support for guest_memfd preservation
  docs: add documentation for guest_memfd preservation via LUO
  selftests: kvm: Split ____vm_create() to expose init helpers
  selftests: kvm: Add guest_memfd_preservation_test

 Documentation/core-api/liveupdate.rst         |   1 +
 Documentation/liveupdate/vmm.rst              | 107 ++++
 MAINTAINERS                                   |  14 +
 include/linux/kho/abi/kvm.h                   | 106 ++++
 include/linux/kvm_host.h                      |  14 +
 kernel/liveupdate/Kconfig                     |  15 +
 tools/testing/selftests/kvm/Makefile.kvm      |   6 +-
 .../kvm/guest_memfd_preservation_test.c       | 236 +++++++++
 .../testing/selftests/kvm/include/kvm_util.h  |   2 +
 tools/testing/selftests/kvm/lib/kvm_util.c    |  26 +-
 virt/kvm/Makefile.kvm                         |   1 +
 virt/kvm/guest_memfd.c                        | 185 +++++--
 virt/kvm/guest_memfd.h                        |  44 ++
 virt/kvm/guest_memfd_luo.c                    | 497 ++++++++++++++++++
 virt/kvm/kvm_luo.c                            | 195 +++++++
 virt/kvm/kvm_main.c                           |  94 +++-
 virt/kvm/kvm_mm.h                             |  15 +
 17 files changed, 1477 insertions(+), 81 deletions(-)
 create mode 100644 Documentation/liveupdate/vmm.rst
 create mode 100644 include/linux/kho/abi/kvm.h
 create mode 100644 tools/testing/selftests/kvm/guest_memfd_preservation_test.c
 create mode 100644 virt/kvm/guest_memfd.h
 create mode 100644 virt/kvm/guest_memfd_luo.c
 create mode 100644 virt/kvm/kvm_luo.c

-- 
2.55.0.rc0.786.g65d90a0328-goog


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2026-06-22 19:13 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-22 18:48 [PATCH v3 0/9] liveupdate: kvm: guest_memfd preservation Tarun Sahu
2026-06-22 18:48 ` [PATCH v3 1/9] liveupdate: Add LIVEUPDATE_GUEST_MEMFD config option Tarun Sahu
2026-06-22 18:48 ` [PATCH v3 2/9] kvm: Prepare core VM structs and helpers for LUO support Tarun Sahu
2026-06-22 19:01   ` sashiko-bot
2026-06-22 18:48 ` [PATCH v3 3/9] kvm: kvm_luo: Allow kvm preservation with LUO Tarun Sahu
2026-06-22 19:06   ` sashiko-bot
2026-06-22 18:48 ` [PATCH v3 4/9] kvm: guest_memfd: Move internal definitions and helper to new header Tarun Sahu
2026-06-22 18:48 ` [PATCH v3 5/9] kvm: guest_memfd: Add support for freezing and unfreezing mappings Tarun Sahu
2026-06-22 19:01   ` sashiko-bot
2026-06-22 18:48 ` [PATCH v3 6/9] kvm: guest_memfd_luo: add support for guest_memfd preservation Tarun Sahu
2026-06-22 19:08   ` sashiko-bot
2026-06-22 18:48 ` [PATCH v3 7/9] docs: add documentation for guest_memfd preservation via LUO Tarun Sahu
2026-06-22 18:54   ` sashiko-bot
2026-06-22 19:04     ` tarunsahu
2026-06-22 18:48 ` [PATCH v3 8/9] selftests: kvm: Split ____vm_create() to expose init helpers Tarun Sahu
2026-06-22 18:48 ` [PATCH v3 9/9] selftests: kvm: Add guest_memfd_preservation_test Tarun Sahu
2026-06-22 19:13   ` sashiko-bot
2026-06-22 18:55 ` [PATCH v3 0/9] liveupdate: kvm: guest_memfd preservation tarunsahu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox