Bug 1658885

Summary: [RHEL.8 Fast Train]It prompts invalid warnning when vm boot with a value of maxcpus bigger than cpus
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: Xujun Ma <xuma>
Component: qemu-kvmAssignee: David Gibson <dgibson>
Status: CLOSED NOTABUG QA Contact: Xujun Ma <xuma>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 8.0CC: kanderso, knoel, mdeng, michen, ngu, qzhang, rbalakri, ribarry, virt-maint, yihyu
Target Milestone: rc   
Target Release: 8.0   
Hardware: ppc64le   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-12-17 02:01:33 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 Xujun Ma 2018-12-13 05:46:47 UTC
Description of problem:
It prompts invalid  warnning when vm boot with a value of maxcpus bigger than cpus

Version-Release number of selected component (if applicable):
qemu-kvm-3.1.0-0.el8.rc5.ppc64le

How reproducible:
100%

Steps to Reproduce:
1.Boot up a vm with command:
/usr/libexec/qemu-kvm \
 -smp 2,maxcpus=64,cores=1,threads=2,sockets=1 \
 -m 4096 \
 -nodefaults \
 -chardev stdio,mux=on,id=serial_id_serial0,server,nowait,signal=off \
 -device spapr-vty,id=serial111,chardev=serial_id_serial0 \
 -mon chardev=serial_id_serial0,mode=readline \ion.                       
 -device virtio-scsi-pci,bus=pci.0 \ item, or 'c' for a command prompt.   
 -device scsi-hd,id=scsi-hd0,drive=scsi-hd0-dr0,bootindex=0 \
 -drive file=rhel80-ppc64le-virtio-scsi.qcow2,if=none,id=scsi-hd0-dr0,format=qcow2,cache=none \
 -device virtio-net-pci,netdev=net0,id=nic0,mac=52:54:00:c4:e7:84 \
 -netdev tap,id=net0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown,vhost=on \

2.
3.

Actual results:
It prompts a warning as following:
qemu-kvm: warning: Invalid CPU topology deprecated: sockets (1) * cores (1) * threads (2) != maxcpus (64)


Expected results:
no any warning

Additional info:
Slow train has no this problem.

Comment 1 David Gibson 2018-12-17 02:01:33 UTC
The warning is correct. The sockets / cores / threads values are always maximums, so they should multiply out to the maximum number of cpus.  I think we just hadn't implemented this warning yet in the older qemu versions.