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: Mon, 23 Mar 2026 11:25:52 +0100 [thread overview]
Message-ID: <CAJaqyWf5==jZxJErazeAea1NxpGB2SFNdpAPh7bi5tc69FytTw@mail.gmail.com> (raw)
In-Reply-To: <20260320142015.3856652-2-jonah.palmer@oracle.com>
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", "early-mig", "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.
> { TYPE_VIRTIO_NET, "host_tunnel", "off" },
> { TYPE_VIRTIO_NET, "host_tunnel_csum", "off" },
> { TYPE_VIRTIO_NET, "guest_tunnel", "off" },
> diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
> index 2a5d642a64..12b3456ca2 100644
> --- a/hw/net/virtio-net.c
> +++ b/hw/net/virtio-net.c
> @@ -4258,6 +4258,7 @@ static const Property virtio_net_properties[] = {
> VIRTIO_NET_F_GUEST_USO6, true),
> DEFINE_PROP_BIT64("host_uso", VirtIONet, host_features,
> VIRTIO_NET_F_HOST_USO, true),
> + DEFINE_PROP_BOOL("early-mig", VirtIONet, early_mig, true),
> DEFINE_PROP_ON_OFF_AUTO_BIT64("hash-ipv4", VirtIONet,
> rss_data.specified_hash_types,
> VIRTIO_NET_HASH_REPORT_IPv4 - 1,
> diff --git a/include/hw/virtio/virtio-net.h b/include/hw/virtio/virtio-net.h
> index 371e376428..ddb141fefc 100644
> --- a/include/hw/virtio/virtio-net.h
> +++ b/include/hw/virtio/virtio-net.h
> @@ -230,6 +230,7 @@ struct VirtIONet {
> struct EBPFRSSContext ebpf_rss;
> uint32_t nr_ebpf_rss_fds;
> char **ebpf_rss_fds;
> + bool early_mig;
> };
>
> size_t virtio_net_handle_ctrl_iov(VirtIODevice *vdev,
> --
> 2.51.0
>
next prev parent reply other threads:[~2026-03-23 10:27 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 [this message]
2026-03-24 14:07 ` Jonah Palmer
2026-03-26 8:02 ` Eugenio Perez Martin
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='CAJaqyWf5==jZxJErazeAea1NxpGB2SFNdpAPh7bi5tc69FytTw@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