Bug 692185

Summary: CPU topology is not passed correctly to QEMU
Product: Red Hat Enterprise Linux 5 Reporter: Yaniv Kaul <ykaul>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 5.6CC: dallan, dyuan, eblake, jkt, mzhan, weizhan, yoyzhang, yupzhang
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-04-26 19:26:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Yaniv Kaul 2011-03-30 16:13:04 UTC
Description of problem:
Note: data is all from https://bugzilla.redhat.com/show_bug.cgi?id=691886#c10

While the topology in the XML is:
<vcpu>4</vcpu>
  <cpu>
      <topology sockets='1' cores='4' threads='1'/>
  </cpu>

The QEMU command line is '-smp 4' which is a bit lacking. Specifically, and that may be a QEMU bug, without cores=, or with cores=1, it looks like it omits the cores information from the guest's /proc/cpuinfo.


Looks like the problems does not exist in RHEL 6.1's libvirt, btw.


Version-Release number of selected component (if applicable):
0.8.2-15.el5_6.1

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Dave Allan 2012-04-26 19:26:03 UTC
Yaniv, I'm closing as WONTFIX, please reopen if you're still interested in 5.x.

Comment 2 yuping zhang 2012-07-05 07:12:19 UTC
Test this issue with libvirt-0.8.2-27.el5,this issue doesn't exist now.
# virsh dumpxml demo
<domain type='kvm' id='3'>
  <name>demo</name>
  <uuid>8016c7eb-a53d-5aa7-37c5-b20da2fbff1f</uuid>
  <memory>524288</memory>
  <currentMemory>524288</currentMemory>
  <vcpu>4</vcpu>
  <os>
    <type arch='x86_64' machine='rhel5.4.0'>hvm</type>
    <kernel>/var/lib/libvirt/boot/vmlinuz</kernel>
    <initrd>/var/lib/libvirt/boot/initrd.img</initrd>
    <boot dev='hd'/>
  </os>
  <cpu>
    <topology sockets='1' cores='4' threads='1'/>
  </cpu>
.....

# ps -ef | grep demo
root     24388     1 28 16:11 ?        00:00:02 /usr/libexec/qemu-kvm -S -M rhel5.4.0 -m 512 -smp 4,sockets=1,cores=4,threads=1 -name demo -uuid 8016c7eb-a53d-5aa7-37c5-b20da2fbff1f -monitor unix:/var/lib/libvirt/qemu/demo.monitor,server,nowait -no-kvm-pit-reinjection -no-acpi -boot c -kernel /var/lib/libvirt/boot/vmlinuz -initrd /var/lib/libvirt/boot/initrd.img -drive file=/var/lib/libvirt/images/demo.qcow2,if=ide,bus=0,unit=0,boot=on,format=qcow2 -net nic,macaddr=52:54:00:53:a6:f0,vlan=0 -net tap,fd=18,vlan=0 -serial pty -parallel none -usb -usbdevice tablet -vnc 127.0.0.1:0 -vga cirrus -balloon virtio


There is -smp 4,sockets=1,cores=4,threads=1 in qemu command line.