Hi Fiona,
On 9/12/25 13:15, Fiona Ebner wrote:
Hi,
Am 28.10.25 um 11:19 AM schrieb Philippe Mathieu-Daudé:
From: Michael Tokarev <[email protected]>
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 <[email protected]>
Tested-by: Lei Yang <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
Message-ID: <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
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.
Thanks for the report. Commits reverted.
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