Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1901893

Summary: [powerpc]QEMU crash on destination side when do forward migration from av-8.3.0(qemu-5.1) to av-8.4.0(qemu-5.2), error "get_pci_config_device: Bad config data: i=0x9a read: 3 device: 6 cmask: ff wmask: 0 w1cmask:0"
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: xianwang <xianwang>
Component: qemu-kvmAssignee: Virtualization Maintenance <virt-maint>
qemu-kvm sub component: Live Migration QA Contact: xianwang <xianwang>
Status: CLOSED DUPLICATE Docs Contact:
Severity: urgent    
Priority: urgent CC: ailan, bfu, dgibson, gkurz, lvivier, mdeng, ngu, qzhang, virt-maint, xuma, yihyu, zheng.zhenyu
Version: 8.4Keywords: Triaged
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.4   
Hardware: ppc64le   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-12-07 08:33:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description xianwang 2020-11-26 11:41:09 UTC
Description of problem:
Forward migration from av-8.3.0(qemu-5.1) to av-8.4.0(qemu-5.2) failed with error"get_pci_config_device: Bad config data: i=0x9a read: 3 device: 6 cmask: ff wmask: 0 w1cmask:0", qemu crash on destination end.

Version-Release number of selected component (if applicable):
[root@ibm-p9b-15 home]# uname -r
4.18.0-240.1.1.el8_3.ppc64le
qemu-kvm-5.1.0-14.module+el8.3.0+8790+80f9c6d8.1.ppc64le
SLOF-20200717-1.gite18ddad8.module+el8.3.0+7638+07cf13d2.noarch

[root@ibm-p9b-26 home]# uname -r
4.18.0-252.el8.dt2.ppc64le
qemu-kvm-5.2.0-0.module+el8.4.0+8855+a9e237a9.ppc64le
SLOF-20200717-1.gite18ddad8.module+el8.4.0+8855+a9e237a9.noarch


How reproducible:
100%

Steps to Reproduce:
1.Boot a guest on av-8.3.0 host with qemu cli
/usr/libexec/qemu-kvm  \
 -name "mouse-vm" \
 -sandbox off \
 -machine pseries-rhel8.3.0 \
 -cpu host \
 -nodefaults  \
 -device VGA,id=video0,bus=pci.0,addr=0x1 \
 -m 4096 \
 -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pci.0,addr=0x4 \
 -smp 4,maxcpus=4,cores=2,threads=1,sockets=2 \
 -vnc :10 \
 -rtc base=utc,clock=host \
 -boot menu=off,strict=off,order=cdn,once=c \
 -enable-kvm  \
 -monitor stdio \

2.Boot incoming mode on av-8.4.0 host with same qemu command line with above appending "-incoming defer"
3.On destination side, start incoming:
(qemu) migrate_incoming tcp:0:5801
4.On source side, start migration
(qemu) migrate -d tcp:10.16.214.124:5801


Actual results:
QEMU crash on destination side, migration completed on source side.
Source:
(qemu) info migrate
globals:
store-global-state: on
only-migratable: off
send-configuration: on
send-section-footer: on
decompress-error-check: on
clear-bitmap-shift: 18
Migration status: completed
total time: 444 ms
downtime: 26 ms
setup: 4 ms
transferred ram: 12936 kbytes
throughput: 284.39 mbps
remaining ram: 0 kbytes
total ram: 4210752 kbytes
duplicate: 1051847 pages
skipped: 0 pages
normal: 921 pages
normal bytes: 3684 kbytes
dirty sync count: 3
page size: 4 kbytes
multifd bytes: 0 kbytes
pages-per-second: 2795190

Destination side:
(qemu) qemu-kvm: get_pci_config_device: Bad config data: i=0x9a read: 3 device: 6 cmask: ff wmask: 0 w1cmask:0
qemu-kvm: Failed to load PCIDevice:config
qemu-kvm: Failed to load virtio-scsi:virtio
qemu-kvm: error while loading state for instance 0x0 of device 'pci@800000020000000:04.0/virtio-scsi'
qemu-kvm: load of migration failed: Invalid argument

Expected results:
Migration successfully and vm works well on destination.

Additional info:

Comment 1 xianwang 2020-11-26 11:48:25 UTC
1.
About the qemu command line of bug report, I have tried without "-device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pci.0,addr=0x4", migration works well.

2.
I also tried with the following qemu command line:
/usr/libexec/qemu-kvm -M pseries-rhel8.3.0 -smp 4 -m 4096 -monitor stdio -nodefaults -blockdev driver=file,cache.direct=on,cache.no-flush=off,filename=/home/xianwang/d2.qcow2,node-name=drive_sys1 -blockdev driver=qcow2,node-name=drive_image1,file=drive_sys1 -device virtio-blk-pci,id=image1,drive=drive_image1,bus=pci.0,addr=0x9,bootindex=0

destination crash with:
(qemu) qemu-kvm: get_pci_config_device: Bad config data: i=0x9a read: 1 device: 4 cmask: ff wmask: 0 w1cmask:0
qemu-kvm: Failed to load PCIDevice:config
qemu-kvm: Failed to load virtio-blk:virtio
qemu-kvm: error while loading state for instance 0x0 of device 'pci@800000020000000:09.0/virtio-blk'
qemu-kvm: load of migration failed: Invalid argument