Migration from v8.0.0-rc2 to v7.2.0 with pcie-root-port device fails
Host environment
- Operating system: Proxmox VE 7.4 (but using upstream QEMU builds)
- OS/kernel version: Linux pve701 5.15.102-1-pve #1 SMP PVE 5.15.102-1 (2023-03-14T13:48Z) x86_64 GNU/Linux
- Architecture: x86
- QEMU flavor: qemu-system-x86_64
- QEMU version: v8.0.0-rc2
- QEMU command line: See the reproducer script below
Description of problem
Loading the VM state fails with:
qemu-system-x86_64: get_pci_config_device: Bad config data: i=0x10a read: 40 device: 0 cmask: ff wmask: 0 w1cmask:0
qemu-system-x86_64: Failed to load PCIDevice:config
qemu-system-x86_64: Failed to load pcie-root-port:parent_obj.parent_obj.parent_obj
qemu-system-x86_64: error while loading state for instance 0x0 of device '0000:00:1c.0/pcie-root-port'
qemu-system-x86_64: Error -22 while loading VM state
Steps to reproduce
Used the following script with the first argument being a build directory of v8.0.0-rc2 and the second a build directory of v7.2.0
#!/bin/bash
rm /tmp/disk.qcow2
args="
-device pcie-root-port,multifunction=on,bus=pcie.0,addr=1c.0,port=1,chassis=1
-machine type=pc-q35-7.2"
$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
Additional information
Bisecting shows that 010746ae ("hw/pci/aer: Implement PCI_ERR_UNCOR_MASK register") is the first bad commit.
Edited by Fiona Ebner