All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] CPR: shared RAM with /dev/fdset for LUO kexec reboot
@ 2025-12-29 12:08 Li Chen
  2025-12-29 12:08 ` [PATCH 1/3] system/physmem: allow /dev/fdset for file-backed RAM Li Chen
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Li Chen @ 2025-12-29 12:08 UTC (permalink / raw)
  To: Peter Xu, Fabiano Rosas, Paolo Bonzini, Laurent Vivier
  Cc: David Hildenbrand, Philippe Mathieu-Daudé, Pasha Tatashin,
	qemu-devel

Hi,

This series improves a CPR workflow for large guests where guest RAM is
shared/external and preserved in place. With shared RAM and x-ignore-shared
enabled, the migration stream skips guest RAM pages and transfers only
non-RAM VM state (vmstate). This avoids copying guest RAM to the on-disk
migration URI, which can significantly reduce checkpoint/restore downtime for
multi-GB guests.

In the LUO/KHO update flow [1], a LUO agent coordinates a host kexec reboot
while keeping VM RAM content intact. LUO creates the guest RAM backing as a
memfd and passes it to QEMU via -add-fd on the initial launch, so that
memory-backend-file can use it as the shared RAM backing. On update, LUO
checkpoints QEMU, reboots the host kernel via kexec, and then re-launches QEMU
to restore vmstate while reusing the same preserved memfd-backed RAM FD.
Today LUO only supports handing off guest RAM via memfd [2].

To re-attach that preserved RAM backing without reopening non-persistent
paths, QEMU needs to let memory-backend-file consume the pre-opened FD using
mem-path=/dev/fdset/<id>. However, memory-backend-file currently uses
open()/creat() directly, so /dev/fdset/<id> cannot be resolved through the
fdset mechanism, making this workflow impossible.

This series allows /dev/fdset/<id> for file-backed RAM, documents the setup,
and adds qtests to validate that x-ignore-shared keeps RAM transfer minimal
in the cpr-reboot path.

[1]: https://docs.kernel.org/next/core-api/liveupdate.html
[2]: https://docs.kernel.org/mm/memfd_preservation.html

Li Chen (3):
  system/physmem: allow /dev/fdset for file-backed RAM
  docs: CPR: document shared RAM with x-ignore-shared
  tests/qtest: cpr-reboot: check ignore-shared transfer

 docs/devel/migration/CPR.rst      | 17 ++++++++--
 system/physmem.c                  | 17 ++++++++--
 tests/qtest/migration/cpr-tests.c | 56 ++++++++++++++++++++++++++++++-
 3 files changed, 84 insertions(+), 6 deletions(-)

-- 
2.52.0


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

end of thread, other threads:[~2026-01-02 15:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-29 12:08 [PATCH 0/3] CPR: shared RAM with /dev/fdset for LUO kexec reboot Li Chen
2025-12-29 12:08 ` [PATCH 1/3] system/physmem: allow /dev/fdset for file-backed RAM Li Chen
2025-12-29 12:08 ` [PATCH 2/3] docs: CPR: document shared RAM with x-ignore-shared Li Chen
2025-12-29 12:08 ` [PATCH 3/3] tests/qtest: cpr-reboot: check ignore-shared transfer Li Chen
2025-12-29 15:50 ` [PATCH 0/3] CPR: shared RAM with /dev/fdset for LUO kexec reboot Pasha Tatashin
2025-12-30  8:30   ` Li Chen
2025-12-30 16:42     ` Pasha Tatashin
2026-01-02 15:39       ` Jason Gunthorpe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.