From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Peter Xu <peterx@redhat.com>
Cc: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>,
	mst@redhat.com, jasowang@redhat.com, farosas@suse.de,
	sw@weilnetz.de, eblake@redhat.com, armbru@redhat.com,
	thuth@redhat.com, philmd@linaro.org, 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 v8 16/19] qapi: introduce backend-transfer migration parameter
Date: Fri, 17 Oct 2025 09:10:38 +0100	[thread overview]
Message-ID: <aPH557l6YnXT-3r8@redhat.com> (raw)
In-Reply-To: <aPFVWi1pwxS8yGay@x1.local>
On Thu, Oct 16, 2025 at 04:28:10PM -0400, Peter Xu wrote:
> On Thu, Oct 16, 2025 at 08:57:18PM +0100, Daniel P. Berrangé wrote:
> > Errm, machine types apply to devices, but this is about transferring
> > backends which are outside the scope of machine types. 
> 
> Ah.. I didn't notice that net backends are not inherited by default from
> qdev, hence not applicable to machine type properties.
> 
> Is it possible we enable it somehow, so that backends can have compat
> properties similarly to frontends?
That is a technical limitation, but the problem here is bigger than
just the lack of qdev. It is a conceptual one - where a device is
implemented, its behaviour is determined exclusively by the QEMU
code. There are some rare exceptions, like host PCI device assignment
where functionality is partly in the host hardware, or external
device backends where impl is offloaded to an external process, but
most pure QEMU impls are able to be made always migratable and compat
can be easily ensured long term via machine types props.
With backends, alot of behaviour is offloaded to either the host
OS, or to external libraries or services. Certain narrow configs
may be able to transfer state, but there will always be configs
were state transfer is impossible. There can be no coarse rule
that a backend is migratable or not - it will usually be highly
dependent on the particular configuration choices of the backend
in use.  Machine types props can't magically make all backend
config scenarios migratable. We need to be able to interrogate
backends at the time migration is required.
> If we go with a list of devices in the migration parameters, to me it'll
> only be a way to workaround the missing of such capability of net backends.
> Meanwhile, the admin will need to manage the list of devices even if the
> admin doesn't really needed to, IMHO.
We shouldn't need to list devices in every scenario. We need to focus on
the internal API design. We need to have suitable APIs exposed by backends
to allow us to query migratability and process vmstate a mere property
'backend-transfer' is insufficient, whether set by QEMU code, or set by
the mgmt app.
If we have proper APIs each device should be able to query whether its
backend can be transferred, and so "do the right thing" if backend
transfer is requested by migration. The ability to list devices in the
migrate command is only needed to be able to exclude some backends if
the purpose of migration is to change a backend
With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
next prev parent reply	other threads:[~2025-10-17  8:12 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-15 13:21 [PATCH v8 00/19] virtio-net: live-TAP local migration Vladimir Sementsov-Ogievskiy
2025-10-15 13:21 ` [PATCH v8 01/19] net/tap: net_init_tap_one(): drop extra error propagation Vladimir Sementsov-Ogievskiy
2025-10-15 13:21 ` [PATCH v8 02/19] net/tap: net_init_tap_one(): move parameter checking earlier Vladimir Sementsov-Ogievskiy
2025-10-15 13:21 ` [PATCH v8 03/19] net/tap: rework net_tap_init() Vladimir Sementsov-Ogievskiy
2025-10-15 13:21 ` [PATCH v8 04/19] net/tap: pass NULL to net_init_tap_one() in cases when scripts are NULL Vladimir Sementsov-Ogievskiy
2025-10-15 13:21 ` [PATCH v8 05/19] net/tap: rework scripts handling Vladimir Sementsov-Ogievskiy
2025-10-15 13:21 ` [PATCH v8 06/19] net/tap: setup exit notifier only when needed Vladimir Sementsov-Ogievskiy
2025-10-15 13:21 ` [PATCH v8 07/19] net/tap: split net_tap_fd_init() Vladimir Sementsov-Ogievskiy
2025-10-15 13:21 ` [PATCH v8 08/19] net/tap: tap_set_sndbuf(): add return value Vladimir Sementsov-Ogievskiy
2025-10-15 13:21 ` [PATCH v8 09/19] net/tap: rework tap_set_sndbuf() Vladimir Sementsov-Ogievskiy
2025-10-15 13:21 ` [PATCH v8 10/19] net/tap: rework sndbuf handling Vladimir Sementsov-Ogievskiy
2025-10-15 13:21 ` [PATCH v8 11/19] net/tap: introduce net_tap_setup() Vladimir Sementsov-Ogievskiy
2025-10-15 13:21 ` [PATCH v8 12/19] net/tap: move vhost fd initialization to net_tap_new() Vladimir Sementsov-Ogievskiy
2025-10-15 13:21 ` [PATCH v8 13/19] net/tap: finalize net_tap_set_fd() logic Vladimir Sementsov-Ogievskiy
2025-10-15 13:21 ` [PATCH v8 14/19] migration: introduce .pre_incoming() vmsd handler Vladimir Sementsov-Ogievskiy
2025-10-15 13:21 ` [PATCH v8 15/19] net/tap: postpone tap setup to pre-incoming Vladimir Sementsov-Ogievskiy
2025-10-15 13:21 ` [PATCH v8 16/19] qapi: introduce backend-transfer migration parameter Vladimir Sementsov-Ogievskiy
2025-10-15 18:19   ` Peter Xu
2025-10-15 19:02     ` Vladimir Sementsov-Ogievskiy
2025-10-15 20:07       ` Peter Xu
2025-10-15 21:02         ` Vladimir Sementsov-Ogievskiy
2025-10-16  8:32           ` Daniel P. Berrangé
2025-10-16  9:23             ` Vladimir Sementsov-Ogievskiy
2025-10-16 10:38               ` Vladimir Sementsov-Ogievskiy
2025-10-16 10:55                 ` Daniel P. Berrangé
2025-10-16 18:40               ` Peter Xu
2025-10-16 18:51                 ` Daniel P. Berrangé
2025-10-16 19:19                   ` Daniel P. Berrangé
2025-10-16 19:39                     ` Peter Xu
2025-10-16 20:00                       ` Daniel P. Berrangé
2025-10-16 19:29                   ` Peter Xu
2025-10-16 19:57                     ` Daniel P. Berrangé
2025-10-16 20:28                       ` Peter Xu
2025-10-17  6:51                         ` Vladimir Sementsov-Ogievskiy
2025-10-17 15:55                           ` Peter Xu
2025-10-17  8:10                         ` Daniel P. Berrangé [this message]
2025-10-17  8:26                           ` Vladimir Sementsov-Ogievskiy
2025-10-17  8:50                             ` Daniel P. Berrangé
2025-10-17  9:18                               ` Vladimir Sementsov-Ogievskiy
2025-10-17  8:39                           ` Vladimir Sementsov-Ogievskiy
2025-10-17 16:08                           ` Peter Xu
2025-10-16 20:26               ` Vladimir Sementsov-Ogievskiy
2025-10-16 20:30                 ` Vladimir Sementsov-Ogievskiy
2025-10-16 10:56   ` Markus Armbruster
2025-10-16 12:07     ` Vladimir Sementsov-Ogievskiy
2025-10-15 13:21 ` [PATCH v8 17/19] virtio-net: support backend-transfer migration for virtio-net/tap Vladimir Sementsov-Ogievskiy
2025-10-16  8:23   ` Daniel P. Berrangé
2025-10-16  9:15     ` Vladimir Sementsov-Ogievskiy
2025-10-15 13:21 ` [PATCH v8 18/19] tests/functional: add skipWithoutSudo() decorator Vladimir Sementsov-Ogievskiy
2025-10-15 13:21 ` [PATCH v8 19/19] tests/functional: add test_x86_64_tap_migration Vladimir Sementsov-Ogievskiy
2025-10-18 15:38 ` [PATCH v8 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=aPH557l6YnXT-3r8@redhat.com \
    --to=berrange@redhat.com \
    --cc=armbru@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=peterx@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).