From: Fabiano Rosas <farosas@suse.de>
To: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>, qemu-devel@nongnu.org
Cc: bchaney@akamai.com, mark.kanda@oracle.com,
philmd@oss.qualcomm.com, vsementsov@yandex-team.ru,
andrey.drobyshev@virtuozzo.com, maciej.szmigiero@oracle.com,
dongli.zhang@oracle.com, mst@redhat.com, clg@redhat.com,
peterx@redhat.com, den@openvz.org, sgarzare@redhat.com,
Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Subject: Re: [PATCH v7 03/16] migration: forbid snapshots in CPR migration modes
Date: Mon, 28 Sep 2026 11:54:45 -0300 [thread overview]
Message-ID: <87fqyt8lze.fsf@suse.de> (raw)
In-Reply-To: <20260918-up-vsock-vhost-v5-v7-3-6ef9ef033c35@virtuozzo.com>
Andrey Drobyshev <andrey.drobyshev@virtuozzo.com> writes:
> The savevm/loadvm operation doesn't make any sense in any of the CPR
> modes. Saving VM state implies saving its RAM entirely, while the whole
> point of CPR is avoiding that: in cpr-transfer and cpr-exec modes RAM is
> preserved in place and never put into the migration stream (see
> migrate_ram_is_ignored() in migration/ram.c). As a result, a snapshot
> taken with such a mode set has no RAM in it, and loading a snapshot with
> such a mode set fails in the RAM loader.
>
> Currently nothing stops these operations from firing with a CPR mode
> still set, e.g. after an earlier CPR attempt. Reject them early in
> migrate_can_snapshot(), which guards 'savevm'/'loadvm' HMP commands as
> well as 'snapshot-save'/'snapshot-load' QMP commands.
>
> Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
> ---
> migration/options.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/migration/options.c b/migration/options.c
> index 05b026f4bf2..f648be1302b 100644
> --- a/migration/options.c
> +++ b/migration/options.c
> @@ -555,8 +555,15 @@ static bool migrate_incoming_started(void)
> bool migrate_can_snapshot(Error **errp)
> {
> MigrationState *s = migrate_get_current();
> + MigMode mode = migrate_mode();
> int i;
>
> + if (mode != MIG_MODE_NORMAL) {
> + error_setg(errp, "Snapshots are not compatible with migration mode %s",
> + MigMode_str(mode));
> + return false;
> + }
> +
> for (i = 0; i < check_caps_savevm.size; i++) {
> int incomp_cap = check_caps_savevm.caps[i];
+CC Akihiko Odaki
Reviewed-by: Fabiano Rosas <farosas@suse.de>
next prev parent reply other threads:[~2026-09-28 14:55 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-18 13:46 [PATCH v7 00/16] migration/cpr: support vhost-vsock devices Andrey Drobyshev
2026-09-18 13:46 ` [PATCH v7 01/16] migration/cpr: forbid saving duplicate CprFds into hash table Andrey Drobyshev
2026-09-28 14:26 ` Peter Xu
2026-09-29 13:28 ` Andrey Drobyshev
2026-09-29 15:37 ` Peter Xu
2026-09-29 17:09 ` Andrey Drobyshev
2026-09-18 13:46 ` [PATCH v7 02/16] tests/unit: add test for duplicate keys in CPR FD table Andrey Drobyshev
2026-09-18 13:46 ` [PATCH v7 03/16] migration: forbid snapshots in CPR migration modes Andrey Drobyshev
2026-09-28 14:29 ` Peter Xu
2026-09-28 14:54 ` Fabiano Rosas [this message]
2026-09-28 17:39 ` Akihiko Odaki
2026-09-29 13:28 ` Andrey Drobyshev
2026-09-18 13:46 ` [PATCH v7 04/16] tests/qtest/migration: add test for snapshot rejection in CPR modes Andrey Drobyshev
2026-09-28 14:33 ` Peter Xu
2026-09-29 13:28 ` Andrey Drobyshev
2026-09-18 13:46 ` [PATCH v7 05/16] vhost-vsock: block CPR migration modes Andrey Drobyshev
2026-09-18 13:46 ` [PATCH v7 06/16] vhost: add vhost_reset_owner op Andrey Drobyshev
2026-09-18 13:46 ` [PATCH v7 07/16] vhost-vsock: don't reset connections during CPR Andrey Drobyshev
2026-09-18 13:46 ` [PATCH v7 08/16] vhost-vsock: fix FD leak in realize() Andrey Drobyshev
2026-09-18 13:47 ` [PATCH v7 09/16] vhost-vsock: preserve vhost FD during CPR Andrey Drobyshev
2026-09-22 9:07 ` Stefano Garzarella
2026-09-18 13:47 ` [PATCH v7 10/16] vhost: factor out vhost_dev_init_backend() Andrey Drobyshev
2026-09-18 13:47 ` [PATCH v7 11/16] vhost: make vhost_dev_cleanup() safe on a partially initialized device Andrey Drobyshev
2026-09-18 13:47 ` [PATCH v7 12/16] vhost: add vhost_dev_set_owner() / vhost_dev_reset_owner() helpers Andrey Drobyshev
2026-09-18 13:47 ` [PATCH v7 13/16] vhost: add vhost_dev_is_initialized() helper Andrey Drobyshev
2026-09-18 13:47 ` [PATCH v7 14/16] vhost-vsock: hand off device ownership across CPR Andrey Drobyshev
2026-09-22 9:26 ` Stefano Garzarella
2026-09-23 11:09 ` Andrey Drobyshev
2026-09-18 13:47 ` [PATCH v7 15/16] tests/qtest/migration: add vhost-vsock tests for cpr-transfer and cpr-exec Andrey Drobyshev
2026-09-28 14:59 ` Peter Xu
2026-09-18 13:47 ` [PATCH v7 16/16] tests/functional: add vhost-vsock CPR test with a live guest Andrey Drobyshev
2026-09-28 15:01 ` Peter Xu
2026-09-22 9:30 ` [PATCH v7 00/16] migration/cpr: support vhost-vsock devices Stefano Garzarella
2026-09-23 11:09 ` Andrey Drobyshev
2026-09-28 10:44 ` Andrey Drobyshev
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=87fqyt8lze.fsf@suse.de \
--to=farosas@suse.de \
--cc=andrey.drobyshev@virtuozzo.com \
--cc=bchaney@akamai.com \
--cc=clg@redhat.com \
--cc=den@openvz.org \
--cc=dongli.zhang@oracle.com \
--cc=maciej.szmigiero@oracle.com \
--cc=mark.kanda@oracle.com \
--cc=mst@redhat.com \
--cc=odaki@rsg.ci.i.u-tokyo.ac.jp \
--cc=peterx@redhat.com \
--cc=philmd@oss.qualcomm.com \
--cc=qemu-devel@nongnu.org \
--cc=sgarzare@redhat.com \
--cc=vsementsov@yandex-team.ru \
/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.