public inbox for qemu-devel@nongnu.org
 help / color / mirror / Atom feed
From: Eugenio Perez Martin <eperezma@redhat.com>
To: Jonah Palmer <jonah.palmer@oracle.com>
Cc: qemu-devel@nongnu.org, eduardo@habkost.net,
	marcel.apfelbaum@gmail.com,  philmd@linaro.org,
	wangyanan55@huawei.com, zhao1.liu@intel.com,  mst@redhat.com,
	sgarzare@redhat.com, jasowang@redhat.com, leiyang@redhat.com,
	 si-wei.liu@oracle.com, boris.ostrovsky@oracle.com,
	armbru@redhat.com
Subject: Re: [RFC v2 01/14] machine,virtio-net: add early-mig property
Date: Thu, 26 Mar 2026 09:02:17 +0100	[thread overview]
Message-ID: <CAJaqyWdR2Rrk=V2rdap16PKvHCzbPSXwakj33gxGruo03tN4Sw@mail.gmail.com> (raw)
In-Reply-To: <cbe7eff3-179d-4bc7-8fcb-ab0ab805a46e@oracle.com>

On Tue, Mar 24, 2026 at 3:07 PM Jonah Palmer <jonah.palmer@oracle.com> wrote:
>
>
>
> On 3/23/26 6:25 AM, Eugenio Perez Martin wrote:
> > On Fri, Mar 20, 2026 at 3:20 PM Jonah Palmer <jonah.palmer@oracle.com> wrote:
> >>
> >> Introduce a new 'early-mig' property that enables the early migration
> >> path for virtio-net devices on machine types >= 10.2:
> >>
> >>   - virtio-net-device,early-mig=on
> >>   - virtio-net-pci,early-mig=on
> >>   - virtio-net-pci-transitional,early-mig=on
> >>   - virtio-net-pci-non-transitional,early-mig=on
> >>   - virtio-net-ccw,early-mig=on
> >>
> >> To preserve compatibility for older machine types (<= 10.1), add compat
> >> overrides in hw_compat_10_1 to keep the legacy default (off).
> >>
> >> With this, machine types 10.2 and newer enable early migration by
> >> default while older machine types retain the previous behavior. Users
> >> may still override explicitly via:
> >>
> >>   -device virtio-net-pci,early-mig=off
> >>   or
> >>   -global virtio-net-device.early-mig=off
> >>
> >> Follow-up patches will implement the actual early migration feature for
> >> virtio-net devices.
> >>
> >> Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
> >> ---
> >>   hw/core/machine.c              | 5 +++++
> >>   hw/net/virtio-net.c            | 1 +
> >>   include/hw/virtio/virtio-net.h | 1 +
> >>   3 files changed, 7 insertions(+)
> >>
> >> diff --git a/hw/core/machine.c b/hw/core/machine.c
> >> index 6cf0e2f404..1b6c7db119 100644
> >> --- a/hw/core/machine.c
> >> +++ b/hw/core/machine.c
> >> @@ -45,6 +45,11 @@ const size_t hw_compat_10_2_len = G_N_ELEMENTS(hw_compat_10_2);
> >>
> >>   GlobalProperty hw_compat_10_1[] = {
> >>       { TYPE_ACPI_GED, "x-has-hest-addr", "false" },
> >> +    { "virtio-net-device", "early-mig", "off" },
> >> +    { "virtio-net-pci", "", "off" },
> >> +    { "virtio-net-pci-transitional", "early-mig", "off" },
> >> +    { "virtio-net-pci-non-transitional", "early-mig", "off" },
> >> +    { "virtio-net-ccw", "early-mig", "off" },
> >
> > Is this needed even if we mark the VMState as optional?
> >
> > The source might not be able to send the device configuration in some
> > cases. For example, if it cannot shadow CVQ. If the destination knows
> > this field is optional, the QEMU source version is irrelevant.
> >
>
> I think it is still needed, yes. This series adds new VMSDs that are
> registered as top-level savevm sections, and, IIUC, a destination guest
> using an older version of Qemu would not be able to ignore these
> "unknown" sections, even if they're optional for the source to send.
>
> The compat property also preserves the pre-10.2 machine-type default, so
> a 10.1 machine type doesn't silently change the migration behavior when
> it's being run on a newer Qemu version.
>

Ok good point. I'm tempted to propose removing the cmdline argument
then, but I see virtio-mem "x-early-migration" also adds it. I don't
think increasing the migration's complexity by adding command-line
cases is worth it, but I guess there is a reason for that. What about
setting it to true by default?

Also, maybe it is worth exploring using the same name for both
properties. At the same time, I remember that x- prefix was
discouraged so... I'll be happy with any option
{x-,}early-mig{,ration}.

Again, I wouldn't object to adding the cmdline parameter, I'm just
trying to make this as easy to maintain in the future as possible :).

> I do agree though that being unable to shadow some state should be
> handled as a runtime check for early migration (like we do for
> vhost-user), but that's separate from a machine-type compat default.
>

Yes, I missed that vhost-user and vhost-vdpa were out of the series at
this patch. It happened with a few comments. I should have gone back
and solved them myself; apologies! If possible, and if you see it
makes sense, you can expand the patch descriptions with the info.



  reply	other threads:[~2026-03-26  8:03 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-20 14:20 [RFC v2 00/14] virtio-net: early VMStateDescription live migration support Jonah Palmer
2026-03-20 14:20 ` [RFC v2 01/14] machine,virtio-net: add early-mig property Jonah Palmer
2026-03-23 10:25   ` Eugenio Perez Martin
2026-03-24 14:07     ` Jonah Palmer
2026-03-26  8:02       ` Eugenio Perez Martin [this message]
2026-03-20 14:20 ` [RFC v2 02/14] virtio, virtio-net: add initial early VMSD for setup-phase migration Jonah Palmer via qemu development
2026-03-24  9:27   ` [RFC v2 02/14] virtio,virtio-net: " Eugenio Perez Martin
2026-03-24 14:28     ` Jonah Palmer
2026-03-24 14:38       ` Eugenio Perez Martin
2026-03-24 17:16         ` Jonah Palmer
2026-03-20 14:20 ` [RFC v2 03/14] virtio,virtio-net: virtio-delta VMSD - VQ state Jonah Palmer
2026-03-20 14:20 ` [RFC v2 04/14] virtio-net: detect VirtIODevice status mid-migration change Jonah Palmer
2026-03-24 10:45   ` Eugenio Perez Martin
2026-03-24 15:01     ` Jonah Palmer
2026-03-26 10:08       ` Eugenio Perez Martin
2026-03-20 14:20 ` [RFC v2 05/14] virtio-net: detect VirtIODevice config buffer " Jonah Palmer
2026-03-24 10:48   ` Eugenio Perez Martin
2026-03-24 15:25     ` Jonah Palmer
2026-03-20 14:20 ` [RFC v2 06/14] virtio-net: detect VirtIONet MAC addr " Jonah Palmer
2026-03-20 14:20 ` [RFC v2 07/14] virtio-net: detect VirtIONet MAC table mid-migration changes Jonah Palmer
2026-03-20 14:20 ` [RFC v2 08/14] virtio-net: detect VirtIONet status mid-migration change Jonah Palmer
2026-03-24 11:26   ` Eugenio Perez Martin
2026-03-24 16:23     ` Jonah Palmer
2026-03-26 10:20       ` Eugenio Perez Martin
2026-03-20 14:20 ` [RFC v2 09/14] virtio-net: detect VirtIONet Rx filter mid-migration changes Jonah Palmer
2026-03-20 14:20 ` [RFC v2 10/14] virtio-net: detect VirtIONet VLAN filter table changes Jonah Palmer
2026-03-20 14:20 ` [RFC v2 11/14] virtio-net: detect VirtIONet guest offload & MQ mid-migration changes Jonah Palmer
2026-03-20 14:20 ` [RFC v2 12/14] virtio-net: detect RSS state " Jonah Palmer
2026-03-20 14:20 ` [RFC v2 13/14] virtio-net: detect pending Tx work for VQs " Jonah Palmer
2026-03-24 11:35   ` Eugenio Perez Martin
2026-03-24 16:47     ` Jonah Palmer
2026-03-26 10:30       ` Eugenio Perez Martin
2026-03-20 14:20 ` [RFC v2 14/14] virtio-net, vhost-net: early migration support for vhost-net Jonah Palmer via qemu development

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='CAJaqyWdR2Rrk=V2rdap16PKvHCzbPSXwakj33gxGruo03tN4Sw@mail.gmail.com' \
    --to=eperezma@redhat.com \
    --cc=armbru@redhat.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=eduardo@habkost.net \
    --cc=jasowang@redhat.com \
    --cc=jonah.palmer@oracle.com \
    --cc=leiyang@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sgarzare@redhat.com \
    --cc=si-wei.liu@oracle.com \
    --cc=wangyanan55@huawei.com \
    --cc=zhao1.liu@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox