Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 880017

Summary: libvirt should check if vcpu topology is right
Product: Red Hat Enterprise Linux 6 Reporter: hongming <honzhang>
Component: libvirtAssignee: Gunannan Ren <gren>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.4CC: acathrow, dallan, dyasny, dyuan, lagarcia, mzhan, rwu
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 965465 (view as bug list) Environment:
Last Closed: 2013-05-30 08:18:46 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:
Bug Depends On:    
Bug Blocks: 965465    

Description hongming 2012-11-26 02:26:53 UTC
Description of problem:
libvirt should check if vcpu topology is right. If the wrong vcpu topology is given in xml , the wrong arguments also be passed to qemu-kvm.

vcpu number = sockets*cores*threads


Version-Release number of selected component (if applicable):
libvirt-0.10.2-9.el6.x86_64


How reproducible:
100% 

Steps to Reproduce:
1.# virsh start rhel63
Domain rhel63 started

2.# virsh dumpxml rhel63
<domain type='kvm' id='104'>
  .......
  <vcpu placement='static'>4</vcpu>
   ......
  <cpu>
    <topology sockets='1' cores='4' threads='2'/> 
  </cpu>


3.# ps -ef|grep qemu-kvm
qemu     21296     1 14 16:41 ?        00:00:17 /usr/libexec/qemu-kvm -name rhel63 -S -M rhel6.4.0 -enable-kvm -m 1024 -smp 4,sockets=1,cores=4,threads=2
......


4 Login guest

# lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    1
Core(s) per socket:    4
CPU socket(s):         1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 13
Stepping:              3
CPU MHz:               3092.974
BogoMIPS:              6185.94
Hypervisor vendor:     KVM
Virtualization type:   full
L1d cache:             32K
L1i cache:             32K
L2 cache:              4096K
NUMA node0 CPU(s):     0-3

  
Actual results:
Wrong vcpu topology can be given in xml and passed to qemu-kvm

Expected results:
libvirt should check if vcpu topology is right.

Additional info:

Comment 3 Gunannan Ren 2013-05-30 08:18:46 UTC
Actually, QEMU can calculate from the values in smp, sockets, cores, threads to emulate how many physical processor, how many cores does each of physical processors contain and how many multi-threading logical processors does each core supports.

The algorithm was explain in my email
https://www.redhat.com/archives/libvir-list/2013-May/thread.html

The results can be verified by using cpuid tool
So I don't think this is a bug. If anything wrong during testing, please reopen this bug again.