Bug 1811874

Summary: Error messages for invalid configuration of die-id are not right
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: Yumei Huang <yuhuang>
Component: qemu-kvmAssignee: Eduardo Habkost <ehabkost>
qemu-kvm sub component: CPU Models QA Contact: Yumei Huang <yuhuang>
Status: CLOSED WONTFIX Docs Contact:
Severity: low    
Priority: low CC: ailan, chayang, ehabkost, juzhang, nanliu, virt-maint
Version: 8.2Keywords: Triaged
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-08-11 13:39:22 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 Yumei Huang 2020-03-10 02:29:46 UTC
Description of problem:
The error messages are not right when set invalid configuration of die-id.

Version-Release number of selected component (if applicable):
qemu-kvm-4.2.0-13.module+el8.2.0+5898+fb4bceae
kernel-4.18.0-185.el8.x86_64

How reproducible:
always

Steps to Reproduce:
1.Set dies in '-smp', set die-id a negative value

# /usr/libexec/qemu-kvm -cpu Cascadelake-Server -smp 1,maxcpus=4,sockets=2,dies=2 \
 -device Cascadelake-Server-x86_64-cpu,socket-id=1,die-id=-4,core-id=0,thread-id=0 -monitor stdio
QEMU 4.2.0 monitor - type 'help' for more information
(qemu) qemu-kvm: -device Cascadelake-Server-x86_64-cpu,socket-id=1,die-id=-4,core-id=0,thread-id=0: CPU die-id is not set


2. Don't set dies in '-smp',

   a) set die-id a negative value or 0, no error message prompt, but no die-id info in 'query-hotpluggable-cpus'

# /usr/libexec/qemu-kvm -cpu Cascadelake-Server -smp 1,maxcpus=4,sockets=4 -device Cascadelake-Server-x86_64-cpu,socket-id=1,die-id=-4,core-id=0,thread-id=0 -monitor stdio  -qmp tcp:0:3333,server,nowait
QEMU 4.2.0 monitor - type 'help' for more information
(qemu) VNC server running on ::1:5901

{'execute': 'query-hotpluggable-cpus' } 
{"return": [
{"props": {"core-id": 0, "thread-id": 0, "socket-id": 3}, "vcpus-count": 1, "type": "Cascadelake-Server-x86_64-cpu"}, 
{"props": {"core-id": 0, "thread-id": 0, "socket-id": 2}, "vcpus-count": 1, "type": "Cascadelake-Server-x86_64-cpu"}, 
{"props": {"core-id": 0, "thread-id": 0, "socket-id": 1}, "vcpus-count": 1, "qom-path": "/machine/peripheral-anon/device[0]", "type": "Cascadelake-Server-x86_64-cpu"}, 
{"props": {"core-id": 0, "thread-id": 0, "socket-id": 0}, "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]", "type": "Cascadelake-Server-x86_64-cpu"}
]}

   b) set die-id a positive value, got error message of invalid die-id

# /usr/libexec/qemu-kvm -cpu Cascadelake-Server -smp 1,maxcpus=4,sockets=4 -device Cascadelake-Server-x86_64-cpu,socket-id=1,die-id=2,core-id=0,thread-id=0 -monitor stdio -qmp tcp:0:3333,server,nowait
QEMU 4.2.0 monitor - type 'help' for more information
(qemu) qemu-kvm: -device Cascadelake-Server-x86_64-cpu,socket-id=1,die-id=2,core-id=0,thread-id=0: Invalid CPU die-id: 2 must be in range 0:0



Actual results:
As above.

Expected results:
The error message should be more accurate. 

Additional info:

Comment 5 Eduardo Habkost 2021-08-11 13:38:57 UTC
I will let this BZ auto-close. It is a very low priority issue, as the error messages are not visible to end users.