From: Juraj Marcin <jmarcin@redhat.com>
To: qemu-devel@nongnu.org
Cc: Juraj Marcin <jmarcin@redhat.com>, Peter Xu <peterx@redhat.com>,
"Dr. David Alan Gilbert" <dave@treblig.org>,
Jiri Denemark <jdenemar@redhat.com>,
Fabiano Rosas <farosas@suse.de>
Subject: [PATCH v2 0/4] migration: Introduce POSTCOPY_DEVICE state
Date: Mon, 27 Oct 2025 16:41:07 +0100 [thread overview]
Message-ID: <20251027154115.4138677-1-jmarcin@redhat.com> (raw)
This series introduces a new POSTCOPY_DEVICE state that is active (both,
on source and destination side), while the destination loads the device
state. Before this series, if the destination machine failed during the
device load, the source side would stay stuck POSTCOPY_ACTIVE with no
way of recovery. With this series, if the migration fails while in
POSTCOPY_DEVICE state, the source side can safely resume, as destination
has not started yet.
RFC: https://lore.kernel.org/all/20250807114922.1013286-1-jmarcin@redhat.com/
V1: https://lore.kernel.org/all/20250915115918.3520735-1-jmarcin@redhat.com/
V2 changes:
- removed old patch 2, that changed migration_has_failed()
Patch 2:
- moved postcopy_ram_listen_thread() to postcopy_ram.c as per TODO,
suggested by Fabiano
Patch 3:
- introduced separate postcopy-exit-on-error setting instead of reusing
existing exit-on-error setting, suggested by Fabiano and Jirka
- merged migration_incoming_finish() and
migration_incoming_state_destroy() into migration_incoming_cleanup()
and added migration_incoming_cleanup_bh(), suggested by Fabiano
Patch 4:
- introduced POSTCOPY_DEVICE state also to destination, suggested by
Jirka
- moved POSTCOPY_DEVICE->POSTCOPY_ACTIVE transition from return path
thread to main migration thread, suggested by Peter
Juraj Marcin (3):
migration: Move postcopy_ram_listen_thread() to postcopy-ram.c
migration: Refactor all incoming cleanup into
migration_incoming_cleanup()
migration: Introduce POSTCOPY_DEVICE state
Peter Xu (1):
migration: Do not try to start VM if disk activation fails
migration/migration-hmp-cmds.c | 2 +-
migration/migration.c | 148 +++++++++++++++++---------
migration/migration.h | 7 +-
migration/postcopy-ram.c | 137 ++++++++++++++++++++++++
migration/postcopy-ram.h | 3 +
migration/savevm.c | 137 ++----------------------
migration/savevm.h | 2 +
migration/trace-events | 1 +
qapi/migration.json | 17 ++-
system/vl.c | 3 +-
tests/qtest/migration/precopy-tests.c | 3 +-
11 files changed, 274 insertions(+), 186 deletions(-)
--
2.51.0
next reply other threads:[~2025-10-27 15:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-27 15:41 Juraj Marcin [this message]
2025-10-27 15:41 ` [PATCH v2 1/4] migration: Do not try to start VM if disk activation fails Juraj Marcin
2025-10-27 15:41 ` [PATCH v2 2/4] migration: Move postcopy_ram_listen_thread() to postcopy-ram.c Juraj Marcin
2025-10-29 19:53 ` Peter Xu
2025-10-30 13:08 ` Juraj Marcin
2025-10-30 15:16 ` Peter Xu
2025-10-27 15:41 ` [PATCH v2 3/4] migration: Refactor all incoming cleanup into migration_incoming_cleanup() Juraj Marcin
2025-10-29 22:02 ` Peter Xu
2025-10-27 15:41 ` [PATCH v2 4/4] migration: Introduce POSTCOPY_DEVICE state Juraj Marcin
2025-10-29 22:57 ` Peter Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251027154115.4138677-1-jmarcin@redhat.com \
--to=jmarcin@redhat.com \
--cc=dave@treblig.org \
--cc=farosas@suse.de \
--cc=jdenemar@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.