Bug 1460637

Summary: The amount of max vpu that retrieve from qemu hash file and domcapabilities are different.
Product: [Community] Virtualization Tools Reporter: wenli <wenli>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: dzheng, gsun, libvirt-maint, mzhan, pkrempa, rbalakri, wenli
Target Milestone: ---   
Target Release: ---   
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: 2017-06-12 11:02:08 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:
Attachments:
Description Flags
xml file that is related to this bug none

Description wenli 2017-06-12 09:47:06 UTC
Created attachment 1287006 [details]
xml file that is related to this bug

Description of problem:
The amount of max vpu that retrieve from qemu hash file and domcapabilities are different, And this situation is occurred on ppc only.

Version-Release number of selected component (if applicable):

Red Hat Enterprise Linux Server release 7.4 Beta (Maipo)
Linux ibm-p8-garrison-02.rhts.eng.bos.redhat.com 3.10.0-675.el7.ppc64le #1 SMP Mon May 29 23:22
libvirt-3.2.0-9.el7.ppc64le

host cpus information are as follows.

Architecture:          ppc64le
Byte Order:            Little Endian
CPU(s):                128
On-line CPU(s) list:   0,8,16,24,32,40,48,56,64,72,80,88,96,104,112,120
Off-line CPU(s) list:  1-7,9-15,17-23,25-31,33-39,41-47,49-55,57-63,65-71,73-79,81-87,89-95,97-103,105-111,113-119,121-127
Thread(s) per core:    1
Core(s) per socket:    8
Socket(s):             2
NUMA node(s):          2
Model:                 1.0 (pvr 004c 0100)
Model name:            POWER8NVL (raw), altivec supported
CPU max MHz:           4023.0000
CPU min MHz:           2061.0000
L1d cache:             64K
L1i cache:             32K
L2 cache:              512K
L3 cache:              8192K
NUMA node0 CPU(s):     0,8,16,24,32,40,48,56
NUMA node1 CPU(s):     64,72,80,88,96,104,112,120

How reproducible:
100%

Steps to Reproduce:
1. Get amount of max vcpu 

# virsh domcapabilities

Get element about vcpu, as follows.
<vcpu max='128'/>

# tail /var/cache/libvirt/qemu/capabilities/3c76bc41d59c0c7314b1ae8e63f4f765d2cf16abaeea081b3ca1f5d8732f7bb1.xml

Get amount of maxCpus for default machine, as follows.
<machine name='pseries-rhel7.4.0' alias='pseries' hotplugCpus='yes' maxCpus='1024'/>

Actual results:
The vcpu values which retrieved from domcapabilities and qemu-kvm hash are different.

Expected results:
The max cpus total is equal whether the value come from domcapabilities or qemu-kvm hash. such as above, vcpu attribute should equal with machine attribute maxCpus.

Additional info:
Note: Above files that related to xml can be found on attachment.

Comment 1 Peter Krempa 2017-06-12 11:02:08 UTC
The XML files in /var/cache/libvirt/qemu are for internal use only. Users should not touch them at all. Since you don't describe anything besides a mismatch of those I don't see a problem here. The data in domain capabilities is adapted to what is actually supported by the host.