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

Bug 1873417

Summary: AMD/NUMA topology - revert 5.1 changes
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: Dr. David Alan Gilbert <dgilbert>
Component: qemu-kvmAssignee: Igor Mammedov <imammedo>
qemu-kvm sub component: CPU Models QA Contact: Yumei Huang <yuhuang>
Status: CLOSED ERRATA Docs Contact:
Severity: unspecified    
Priority: high CC: ailan, babu.moger, chayang, ctatman, dgilbert, ehabkost, ehadley, imammedo, jen, jinzhao, juzhang, nanliu, virt-maint, wei.huang2, xianwang, xiaohli, ymankad, yuhuang
Version: 8.3Keywords: Triaged
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-5.1.0-5.module+el8.3.0+7975+b80d25f1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1728166 Environment:
Last Closed: 2020-11-17 17:50:55 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:
Bug Depends On:    
Bug Blocks: 1795644, 1828750    

Comment 3 Igor Mammedov 2020-08-28 10:22:11 UTC
Reproducer using upstream QEMU:

source:
  # qemu-4.2 -M pc-i440fx-4.2 -cpu EPYC -smp 8,sockets=1,cores=8 -numa node,cpus=0-3 -numa node,cpus=4-7 -m 2048 -snapshot -monitor stdio -enable-kvm /vmimage
    (qemu) stop
    (qemu) migrate "exec:gzip -c > STATEFILE.gz"

target:
  # qemu-5.1 -cpu EPYC -smp 8,sockets=1,cores=8 -numa node,cpus=0-3 -numa node,cpus=4-7 -m 2048 -snapshot -monitor stdio -enable-kvm -M pc-i440fx-4.2 -incoming "exec: gzip -c -d STATEFILE.gz" /vmimage

migration fails with:

 qemu-system-x86_64: Unknown savevm section or instance 'apic' 4. Make sure that your current VM setup matches your saved VM setup, including any hotplugged devices
 qemu-system-x86_64: load of migration failed: Invalid argument

Comment 4 Dr. David Alan Gilbert 2020-08-28 10:40:05 UTC
Replicated on downstream:

qemu-kvm-core-4.2.0-29.module+el8.2.1+7712+3c3fe332.2.x86_64
/usr/libexec/qemu-kvm -M pc-q35-rhel8.2.0 -cpu EPYC -smp 8,sockets=1,cores=8 -numa node,cpus=0-3 -numa node,cpus=4-7 -m 2048 -nographic
(qemu)  migrate "tcp:vl721:4444"

qemu-kvm-core-5.1.0-4.module+el8.3.0+7846+ae9b566f.x86_64
/usr/libexec/qemu-kvm -M pc-q35-rhel8.2.0 -cpu EPYC -smp 8,sockets=1,cores=8 -numa node,cpus=0-3 -numa node,cpus=4-7 -m 2048 -nographic -incoming tcp::4444
qemu-kvm: warning: Default splitting of RAM between nodes is deprecated, Use '-numa node,memdev' to explictly define RAM allocation per node
qemu-kvm: Unknown savevm section or instance 'apic' 4. Make sure that your current VM setup matches your saved VM setup, including any hotplugged devices
qemu-kvm: load of migration failed: Invalid argument

Comment 5 Dr. David Alan Gilbert 2020-08-28 10:52:39 UTC
Can we fix this just by turning off '.use_epyc_apic_id_encoding' on the CPU models?

Comment 6 Babu Moger 2020-08-28 14:32:30 UTC
(In reply to Dr. David Alan Gilbert from comment #5)
> Can we fix this just by turning off '.use_epyc_apic_id_encoding' on the CPU
> models?

We can do that. It will be good if we can fix couple of decoding issues in CPUID 0x8000001e with that. I think we are almost there. 
https://lore.kernel.org/qemu-devel/56d9a7fb-d88a-258d-1c67-768d63369643@amd.com/
Hopefully it will resolved soon. thanks

Comment 18 errata-xmlrpc 2020-11-17 17:50:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (virt:8.3 bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:5137