Bug 866949

Summary: It seems like libvirt detect's the CPU count and CPU model wrong on certain AMD Opteron CPU's when used with ovirt.
Product: [Community] Virtualization Tools Reporter: Erik Meijer <erik.meijer01>
Component: libvirtAssignee: Peter Krempa <pkrempa>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: dyasny, jdenemar, pkrempa
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-10-29 11:11:20 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
Tar of /sys/devices/system/{cpu,node} none

Description Erik Meijer 2012-10-16 11:32:56 UTC
Description of problem:

It seems like libvirt detect's the CPU count and CPU model wrong on certain AMD Opteron CPU's when used with ovirt.
In my case 6 instead of 12 cores and Opteron_G1 instead of Opteron_G4

I was asked to file this as a bug here. 


Version-Release number of selected component (if applicable):
libvirt-0.9.11.5-3.fc17.x86_64


x86info -all:  http://pastebin.com/kBD8guEk
dmidecode -t4: http://pastebin.com/y28CTbKg
/proc/cpuinfo: http://pastebin.com/8R6Ub6iF

And attached is a tar of /sys/devices/system/{cpu,node}

Comment 1 Peter Krempa 2012-10-16 11:49:24 UTC
The issue with missing cores is probably resolved by https://bugzilla.redhat.com/show_bug.cgi?id=825095

Comment 2 Erik Meijer 2012-10-16 12:08:33 UTC
I got the CPU model by applying this caps.py

http://gerrit.ovirt.org/#/c/5035/

It is said that this fix will resolve the missing cores problem but I have not applied that fix.

http://gerrit.ovirt.org/#/c/7097/

Comment 3 Jiri Denemark 2012-10-16 12:58:06 UTC
This might have been fixed in v0.10.0 by (but we need the files from /sys to be sure):

commit 80533ca25d809a2a3e81266a0acabf61a0f86ced
Author: Peter Krempa <pkrempa>
Date:   Mon Jul 9 16:57:49 2012 +0200

    nodeinfo: Fix gathering of nodeinfo data structure
    
    This patch changes the way data to fill the nodeinfo structure are
    gathered. We've gathere the test data by iterating processors an sockets
    separately from nodes. The reported data was based solely on information
    about core id. Problems arise when eg cores in mulit-processor machines
    don't have same id's on both processors or maybe one physical processor
    contains more NUMA nodes.
    
    This patch changes the approach how we detect processors and nodes. Now
    we start at enumerating nodes and for each node processors, sockets and
    threads are enumerated separately. This approach provides acurate data
    that comply to docs about the nodeinfo structure. This also enables to
    get rid of hacks: see commits 10d9038b744a69c8d4bd29c2e8c012a097481586,
    ac9dd4a676f21b5e3ca6dbe0526f2a6709072beb. (Those changes in nodeinfo.c
    are efectively reverted by this patch).
    
    This patch also changes output of one of the tests, as the processor
    topology is now acquired more precisely.

Comment 4 Erik Meijer 2012-10-16 13:25:27 UTC
Created attachment 628151 [details]
Tar of /sys/devices/system/{cpu,node}

Comment 5 Peter Krempa 2012-10-29 11:11:20 UTC
The test data are in the format required by libvirt to correctly detect the processor topology after commit 80533ca25d809a2a3e81266a0acabf61a0f86ced so this issue should be fixed in the current upstream release now.