Bug 1253525

Summary: Boot qemu process, When maxcpus >111 and memory slots=256, there are ACPI warnings show.
Product: Red Hat Enterprise Linux 7 Reporter: Pei Zhang <pezhang>
Component: qemu-kvm-rhevAssignee: Igor Mammedov <imammedo>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: chayang, dgilbert, ehabkost, hhuang, imammedo, juzhang, knoel, michen, virt-maint, xfu
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-08 11:53:28 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 Pei Zhang 2015-08-14 02:07:12 UTC
Description of problem:
When maxcpus >111, there are ACPI warnings show. 

Version-Release number of selected component (if applicable):
Host:
Kernel:3.10.0-304.el7.x86_64
qemu-kvm-rhev:qemu-kvm-rhev-2.3.0-17.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.#/usr/libexec/qemu-kvm -name RHEL7.2 -m 4G,slots=256,maxmem=40G -smp 2,cores=1,threads=1,sockets=2,maxcpus=112

Actual results:
# /usr/libexec/qemu-kvm -name RHEL7.2 -m 4G,slots=256,maxmem=40G -smp 2,cores=1,threads=1,sockets=2,maxcpus=112
VNC server running on `::1:5900'
qemu-kvm: Warning: ACPI tables are larger than 64k.
qemu-kvm: Warning: migration may not work.
qemu-kvm: Warning: please remove CPUs, NUMA nodes, memory slots or PCI bridges.
qemu-kvm: Warning: ACPI tables are larger than 64k.
qemu-kvm: Warning: migration may not work.
qemu-kvm: Warning: please remove CPUs, NUMA nodes, memory slots or PCI bridges.

Expected results:
No Warning.

Additional info:

Comment 2 Pei Zhang 2015-08-14 02:51:19 UTC
In qemu-kvm-rhev-2.3.0-6.el7.x86_64 it works well, but in qemu-kvm-rhev-2.3.0-7.el7.x86_64 this problem begin to appear. So this bug is a regression.

BTW, When maxcpus >111 and memory slots=256, the warnings show.

Comment 4 Karen Noel 2015-08-14 11:08:26 UTC
qemu-kvm: Warning: ACPI tables are larger than 64k.
qemu-kvm: Warning: migration may not work.
qemu-kvm: Warning: please remove CPUs, NUMA nodes, memory slots or PCI bridges.

Why does live migration maybe not work with ACPI tables larger than 64k? Can this be fixed?

What if the user does not care about live migration? Should the code just disable live migration and inform the user (instead of warn)?

Comment 5 Dr. David Alan Gilbert 2015-08-17 10:11:16 UTC
(In reply to Karen Noel from comment #4)
> qemu-kvm: Warning: ACPI tables are larger than 64k.
> qemu-kvm: Warning: migration may not work.
> qemu-kvm: Warning: please remove CPUs, NUMA nodes, memory slots or PCI
> bridges.
> 
> Why does live migration maybe not work with ACPI tables larger than 64k? Can
> this be fixed?
> 
> What if the user does not care about live migration? Should the code just
> disable live migration and inform the user (instead of warn)?

I think the problem here is one of RAMBlock sizes; slight changes in the ACPI table generation between versions can cause slight changes in the sizes of the tables;  the way it used to work was that the tables were rounded to a 4k page boundary and if your number of CPUs/NUMA nodes/memory slots/PCI bridges were just right, then on one QEMU version the ACPI table might be fit in n*4k pages, and on the migration destination it might be (n+1)*4k (or even n-1).  This was very delicate and we had bugs before on large configurations where migrations would fail.

MST changed it so that there is a resizing system that deals with differences in table sizes - upto a limit (128k table); this warning is set a bit coursely at 128k/2 on the basis that if the destination qemu's tables were twice the size then we would hit the table size difference.

The change between 2.3.0-6 and 2.3.0-7 looks like it was probably drjones's changes in ACPI generation that probably made a minor size change.

Comment 6 Igor Mammedov 2015-09-08 11:53:28 UTC
It's intended behaviour that we introduced is upstream QEMU, so that instead of silently running, it would warn in advance that cross version migration might not work.