qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>, qemu-devel@nongnu.org
Cc: Michael Tokarev <mjt@tls.msk.ru>,
	Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>,
	Lei Yang <leiyang@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Jason Wang <jasowang@redhat.com>
Subject: Re: [PULL 03/23] hw/net/virtio-net: make VirtIONet.vlans an array instead of a pointer
Date: Tue, 9 Dec 2025 13:15:47 +0100	[thread overview]
Message-ID: <7798584d-e861-47b7-af52-2c2efb67a4de@proxmox.com> (raw)
In-Reply-To: <20251028074901.22062-4-philmd@linaro.org>

Hi,

Am 28.10.25 um 11:19 AM schrieb Philippe Mathieu-Daudé:
> From: Michael Tokarev <mjt@tls.msk.ru>
> 
> This field is a fixed-size buffer (number of elements is MAX_VLAN,
> known at build time).  There's no need to allocate it dynamically,
> it can be made an integral part of VirtIONet structure.
> 
> This field is the only user of VMSTATE_BUFFER_POINTER_UNSAFE() macro.
> 
> Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
> Tested-by: Lei Yang <leiyang@redhat.com>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
> Message-ID: <20251023135316.31128-2-mjt@tls.msk.ru>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>

unfortunately, after this commit, loading a VM state taken with v10.1.2
or older doesn't work anymore:

> qemu-system-x86_64: Missing section footer for 0000:00:13.0/virtio-net
> qemu-system-x86_64: Section footer error, section_id: 41

Reproducer below [0].


Reverting

> 58341158d0 migration/vmstate: remove VMSTATE_BUFFER_POINTER_UNSAFE macro
> 3a9cd2a4a1 hw/net/virtio-net: make VirtIONet.vlans an array instead of a pointer

in current master makes it work again.


I'm also seeing the following when a guest is actually running:

> kvm: VQ 1 size 0x100 < last_avail_idx 0x9 - used_idx 0x3e30
> kvm: load of migration failed: Operation not permitted: error while loading state for instance 0x0 of device '0000:00:13.0/virtio-net': Failed to load element of type virtio for virtio: -1

and here too a revert of the two commits seems to help :)


Best Regards,
Fiona


[0]:

> [I] root@pve9a1 ~# cat snapshot-virtio-net.sh
> #!/bin/bash
> rm /tmp/disk.qcow2
> args="
>   -netdev type=tap,id=net1,ifname=tap104i1,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on
>   -device virtio-net-pci,mac=BC:24:11:32:3C:69,netdev=net1,bus=pci.0,addr=0x13,id=net1
>   -machine type=pc-i440fx-10.1
> "
> $1/qemu-img create -f qcow2 /tmp/disk.qcow2 1G
> $1/qemu-system-x86_64 --qmp stdio --blockdev qcow2,node-name=node0,file.driver=file,file.filename=/tmp/disk.qcow2 $args <<EOF
> {"execute": "qmp_capabilities"}
> {"execute": "snapshot-save", "arguments": { "job-id": "save0", "tag": "snap", "vmstate": "node0", "devices": ["node0"] } }
> {"execute": "quit"}
> EOF
> $2/qemu-system-x86_64 --qmp stdio --blockdev qcow2,node-name=node0,file.driver=file,file.filename=/tmp/disk.qcow2 $args -loadvm snap




  reply	other threads:[~2025-12-09 12:16 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-28  7:48 [PULL 00/23] Misc HW patches for 2025-10-28 Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 01/23] target/hppa: Set FPCR exception flag bits for non-trapped exceptions Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 02/23] qom: remove redundant typedef when use OBJECT_DECLARE_SIMPLE_TYPE Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 03/23] hw/net/virtio-net: make VirtIONet.vlans an array instead of a pointer Philippe Mathieu-Daudé
2025-12-09 12:15   ` Fiona Ebner [this message]
2025-12-09 20:07     ` Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 04/23] migration/vmstate: remove VMSTATE_BUFFER_POINTER_UNSAFE macro Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 05/23] hw/pci-host/raven: Simplify creating PCI facing part Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 06/23] hw/pci-host/raven: Simplify " Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 07/23] hw/pci-host/raven: Simplify host bridge type declaration Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 08/23] hw/pci-host/raven: Use DEFINE_TYPES macro Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 09/23] hw/pci-host/raven: Simplify PCI bus creation Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 10/23] hw/qdev: Have qdev_get_gpio_out_connector() take const DeviceState arg Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 11/23] hw/sysbus: Have various helpers take a const SysBusDevice argument Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 12/23] hw/uefi: Include missing 'system/memory.h' header Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 13/23] hw/int/loongarch: " Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 14/23] hw/core/loader: Use qemu_open() instead of open() in get_image_size() Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 15/23] hw/core/loader: capture Error from load_image_targphys Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 16/23] hw/core/loader: improve error handling in image loading functions Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 17/23] hw/core/loader: add check for zero size in load_image_targphys_as Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 18/23] hw/core/loader: Pass errp to load_image_targphys_as() Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 19/23] hw/ppc: Pass error_fatal to load_image_targphys() Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 20/23] nw/nvram/ds1225y: Fix nvram MemoryRegion owner Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 21/23] hw/i386/intel_iommu: Remove an unused state field Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 22/23] hw/riscv: Use generic hwaddr for firmware addresses Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 23/23] hw/riscv: Widen OpenSBI dynamic info struct Philippe Mathieu-Daudé
2025-10-28 12:12 ` [PULL 00/23] Misc HW patches for 2025-10-28 Richard Henderson

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=7798584d-e861-47b7-af52-2c2efb67a4de@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=jasowang@redhat.com \
    --cc=leiyang@redhat.com \
    --cc=mjt@tls.msk.ru \
    --cc=mst@redhat.com \
    --cc=odaki@rsg.ci.i.u-tokyo.ac.jp \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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).