From: Peter Xu <peterx@redhat.com>
To: qemu-devel@nongnu.org
Cc: Fabiano Rosas <farosas@suse.de>,
peterx@redhat.com, Li Zhijian <lizhijian@fujitsu.com>,
qemu-stable <qemu-stable@nongnu.org>,
Zhang Chen <zhangckid@gmail.com>
Subject: [PULL 1/9] migration: Fix transition to COLO state from precopy
Date: Fri, 21 Nov 2025 19:26:47 -0500 [thread overview]
Message-ID: <20251122002656.687350-2-peterx@redhat.com> (raw)
In-Reply-To: <20251122002656.687350-1-peterx@redhat.com>
From: Li Zhijian <lizhijian@fujitsu.com>
Commit 4881411136 ("migration: Always set DEVICE state") set a new DEVICE
state before completed during migration, which broke the original transition
to COLO. The migration flow for precopy has changed to:
active -> pre-switchover -> device -> completed.
This patch updates the transition state to ensure that the Pre-COLO
state corresponds to DEVICE state correctly.
Cc: qemu-stable <qemu-stable@nongnu.org>
Fixes: 4881411136 ("migration: Always set DEVICE state")
Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
Reviewed-by: Zhang Chen <zhangckid@gmail.com>
Tested-by: Zhang Chen <zhangckid@gmail.com>
Link: https://lore.kernel.org/r/20251104013606.1937764-1-lizhijian@fujitsu.com
Signed-off-by: Peter Xu <peterx@redhat.com>
---
migration/migration.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/migration/migration.c b/migration/migration.c
index c2daab6bdd..1b2c02d7fa 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -3081,9 +3081,9 @@ static void migration_completion(MigrationState *s)
goto fail;
}
- if (migrate_colo() && s->state == MIGRATION_STATUS_ACTIVE) {
+ if (migrate_colo() && s->state == MIGRATION_STATUS_DEVICE) {
/* COLO does not support postcopy */
- migrate_set_state(&s->state, MIGRATION_STATUS_ACTIVE,
+ migrate_set_state(&s->state, MIGRATION_STATUS_DEVICE,
MIGRATION_STATUS_COLO);
} else {
migration_completion_end(s);
--
2.50.1
next prev parent reply other threads:[~2025-11-22 4:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-22 0:26 [PULL 0/9] Staging patches Peter Xu
2025-11-22 0:26 ` Peter Xu [this message]
2025-11-22 0:26 ` [PULL 2/9] migration: set correct list pointer when removing notifier Peter Xu
2025-11-22 0:26 ` [PULL 3/9] migration: Plug memory leaks after migrate_set_error() Peter Xu
2025-11-22 0:26 ` [PULL 4/9] migration: Use warn_reportf_err() where appropriate Peter Xu
2025-11-24 21:22 ` Peter Maydell
2025-11-25 6:56 ` Markus Armbruster
2025-11-22 0:26 ` [PULL 5/9] migration/postcopy-ram: Improve error reporting after loadvm failure Peter Xu
2025-11-22 0:26 ` [PULL 6/9] tests/migration-test: Introduce MemType Peter Xu
2025-11-22 0:26 ` [PULL 7/9] tests/migration-test: Merge shmem_opts into memory_backend Peter Xu
2025-11-22 0:26 ` [PULL 8/9] tests/migration-test: Add MEM_TYPE_SHMEM Peter Xu
2025-11-22 0:26 ` [PULL 9/9] tests/migration-test: Use MEM_TYPE_MEMFD for memory_backend Peter Xu
2025-11-23 23:28 ` [PULL 0/9] Staging patches Richard Henderson
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=20251122002656.687350-2-peterx@redhat.com \
--to=peterx@redhat.com \
--cc=farosas@suse.de \
--cc=lizhijian@fujitsu.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=zhangckid@gmail.com \
/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.