From: Peter Xu <peterx@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Cc: mst@redhat.com, jasowang@redhat.com, farosas@suse.de,
sw@weilnetz.de, eblake@redhat.com, armbru@redhat.com,
thuth@redhat.com, philmd@linaro.org, berrange@redhat.com,
qemu-devel@nongnu.org, michael.roth@amd.com,
steven.sistare@oracle.com, leiyang@redhat.com,
davydov-max@yandex-team.ru, yc-core@yandex-team.ru,
raphael.s.norwitz@gmail.com
Subject: Re: [PATCH v7 16/19] qapi: add interface for backend-transfer virtio-net/tap migration
Date: Thu, 16 Oct 2025 12:25:53 -0400 [thread overview]
Message-ID: <aPEckcsXUEjfDk2z@x1.local> (raw)
In-Reply-To: <981b9636-0a7a-4334-b222-7621971e6b2c@yandex-team.ru>
On Wed, Oct 15, 2025 at 11:17:27PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> Off topic:
>
> Didn't you think about moving to some context-free protocol for migration
> stream? Current protocol is hardly bound to migration states definitions
> in the code. This, for example, makes writing an external tool to analyze the
> stream almost impossible. As well, any misconfiguration leads to strange
> error, when we treat data wrongly on the target.
>
> I imagine.. json? Or something like this.. So that we can always understand
> the structure of incoming object, even if we don't know, what exactly we
> are going to get. This also simplifies expanding the state in new verions:
> we just add a new field into migratable object, and can handle absent field
> in incoming stream.
Have you looked at the current encoded JSON dump within the migration
stream? See should_send_vmdesc().
That looks like what you're describing, but definitely different in that it
should only be used for debugging purposes e.g. when a stream is dumped
into a file. The JSON should only only appear also on precopy as of now.
We might try to move it _before_ the real binary stream, or making the
stream itself to be JSON, but there'll be tricky things we need to think
about.
At least it should be problematic when we want to dump it before the binary
stream, because there can be VMSD fields or subsections that has a test()
function that will only conditionally appear depending on any possible
conditions (e.g. device register states). If we try to dump it before
hand, it may mean after device registers changed and when we stop VM and
dump the real binary stream the test() fn may return something different,
starting to mismatch with the JSON description.
Dump the whole thing completely with JSON format is indeed another approach
that I am not aware of anyone hought further. I believe some of us
(including myself) pictured how it could look like, but I am not aware
anyone went deeper than that. Maybe it's because the current methods work
not as good but okay so that no one yet decided to think it all through.
In short, for simple machine types, they use VMSD versioning hence backward
migration is not supported. For enterprise use, machine type properties
are used and there aren't a huge lot so maybe not as bothering.
Thanks,
--
Peter Xu
next prev parent reply other threads:[~2025-10-16 16:27 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-10 17:39 [PATCH v7 00/19] virtio-net: live-TAP local migration Vladimir Sementsov-Ogievskiy
2025-10-10 17:39 ` [PATCH v7 01/19] net/tap: net_init_tap_one(): drop extra error propagation Vladimir Sementsov-Ogievskiy
2025-10-10 17:39 ` [PATCH v7 02/19] net/tap: net_init_tap_one(): move parameter checking earlier Vladimir Sementsov-Ogievskiy
2025-10-10 17:39 ` [PATCH v7 03/19] net/tap: rework net_tap_init() Vladimir Sementsov-Ogievskiy
2025-10-10 17:39 ` [PATCH v7 04/19] net/tap: pass NULL to net_init_tap_one() in cases when scripts are NULL Vladimir Sementsov-Ogievskiy
2025-10-10 17:39 ` [PATCH v7 05/19] net/tap: rework scripts handling Vladimir Sementsov-Ogievskiy
2025-10-10 17:39 ` [PATCH v7 06/19] net/tap: setup exit notifier only when needed Vladimir Sementsov-Ogievskiy
2025-10-10 17:39 ` [PATCH v7 07/19] net/tap: split net_tap_fd_init() Vladimir Sementsov-Ogievskiy
2025-10-10 17:39 ` [PATCH v7 08/19] net/tap: tap_set_sndbuf(): add return value Vladimir Sementsov-Ogievskiy
2025-10-10 17:39 ` [PATCH v7 09/19] net/tap: rework tap_set_sndbuf() Vladimir Sementsov-Ogievskiy
2025-10-10 17:39 ` [PATCH v7 10/19] net/tap: rework sndbuf handling Vladimir Sementsov-Ogievskiy
2025-10-10 17:39 ` [PATCH v7 11/19] net/tap: introduce net_tap_setup() Vladimir Sementsov-Ogievskiy
2025-10-10 17:39 ` [PATCH v7 12/19] net/tap: move vhost fd initialization to net_tap_new() Vladimir Sementsov-Ogievskiy
2025-10-10 17:39 ` [PATCH v7 13/19] net/tap: finalize net_tap_set_fd() logic Vladimir Sementsov-Ogievskiy
2025-10-10 17:39 ` [PATCH v7 14/19] migration: introduce .pre_incoming() vmsd handler Vladimir Sementsov-Ogievskiy
2025-10-14 16:26 ` Peter Xu
2025-10-10 17:39 ` [PATCH v7 15/19] net/tap: postpone tap setup to pre-incoming Vladimir Sementsov-Ogievskiy
2025-10-10 17:39 ` [PATCH v7 16/19] qapi: add interface for backend-transfer virtio-net/tap migration Vladimir Sementsov-Ogievskiy
2025-10-14 16:33 ` Peter Xu
2025-10-14 19:31 ` Vladimir Sementsov-Ogievskiy
2025-10-14 20:25 ` Peter Xu
2025-10-14 21:46 ` Vladimir Sementsov-Ogievskiy
2025-10-14 21:54 ` Vladimir Sementsov-Ogievskiy
2025-10-15 7:11 ` Daniel P. Berrangé
2025-10-15 18:27 ` Peter Xu
2025-10-15 20:17 ` Vladimir Sementsov-Ogievskiy
2025-10-16 16:25 ` Peter Xu [this message]
2025-10-16 17:06 ` Vladimir Sementsov-Ogievskiy
2025-10-10 17:39 ` [PATCH v7 17/19] virtio-net: support backend-transfer migration for virtio-net/tap Vladimir Sementsov-Ogievskiy
2025-10-10 17:39 ` [PATCH v7 18/19] tests/functional: add skipWithoutSudo() decorator Vladimir Sementsov-Ogievskiy
2025-10-10 17:39 ` [PATCH v7 19/19] tests/functional: add test_x86_64_tap_migration Vladimir Sementsov-Ogievskiy
2025-10-11 15:26 ` [PATCH v7 00/19] virtio-net: live-TAP local migration Lei Yang
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=aPEckcsXUEjfDk2z@x1.local \
--to=peterx@redhat.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=davydov-max@yandex-team.ru \
--cc=eblake@redhat.com \
--cc=farosas@suse.de \
--cc=jasowang@redhat.com \
--cc=leiyang@redhat.com \
--cc=michael.roth@amd.com \
--cc=mst@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=raphael.s.norwitz@gmail.com \
--cc=steven.sistare@oracle.com \
--cc=sw@weilnetz.de \
--cc=thuth@redhat.com \
--cc=vsementsov@yandex-team.ru \
--cc=yc-core@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).