Bug 806754

Summary: [RFE] Guest cpu topology should same with host CPU definition from capabilities XML when set cpu mode='host-model'
Product: Red Hat Enterprise Linux 6 Reporter: zhe peng <zpeng>
Component: libvirtAssignee: Jiri Denemark <jdenemar>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3CC: acathrow, dallan, dyuan, ehabkost, mzhan, rwu, yupzhang
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-20 14:55:22 UTC Type: ---
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
host capabilities xml file none

Description zhe peng 2012-03-26 07:21:13 UTC
Created attachment 572679 [details]
host capabilities xml file

Description of problem:
guest cpu topology should same with host CPU definition from capabilities XML when set cpu mode='host-model'

Version-Release number of selected component (if applicable):
libvirt-0.9.10-6.el6
qemu-kvm-0.12.1-2.241.el6

How reproducible:
100%

Steps to Reproduce:
1. edit guest xml and start guest
#virsh edit $guest_name
.....
<cpu mode='host-model'/>
.....
#virsh start $guest_name
2. check host cpu definition from capabilities XML
#virsh capabilities
......
 <cpu>
      <arch>x86_64</arch>
      <model>Penryn</model>
      <vendor>Intel</vendor>
      <topology sockets='1' cores='4' threads='1'/>
      <feature name='osxsave'/>
      <feature name='xsave'/>
......

#virsh nodeinfo
CPU model:           x86_64
CPU(s):              4
CPU frequency:       2000 MHz
CPU socket(s):       1
Core(s) per socket:  4
Thread(s) per core:  1
NUMA cell(s):        1
Memory size:         7575492 kB

3. #ps -ef | grep $guest_name
qemu      3847     1 17 01:57 ?        00:01:31 /usr/libexec/qemu-kvm -S -M rhel6.3.0 -cpu Penryn,+osxsave,+xsave,+pdcm,+xtpr,+tm2,+est,+vmx,+ds_cpl,+monitor,+dtes64,+pbe,+tm,+ht,+ss,+acpi,+ds,+vme -enable-kvm -m 1024 -smp 4,sockets=4,cores=1,threads=1 -name rhel6.3 -uuid 0cf5ebf9-2397-5dea-97b2-ea78da13b70c -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/rhel6.3.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 -drive file=/var/lib/libvirt/images/rhel6.3.img,if=none,id=drive-ide0-0-0,format=qcow2,cache=none -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -netdev tap,fd=28,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:8c:1a:53,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -vnc 0.0.0.0:1 -vga cirrus -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5

the cpu topology change to sockets=4,cores=1,threads=1

4. login guest check cpuinfo
#virsh nodeinfo
CPU model:           x86_64
CPU(s):              4
CPU frequency:       2826 MHz
CPU socket(s):       4
Core(s) per socket:  1
Thread(s) per core:  1
NUMA cell(s):        1
Memory size:         1020412 kB

  
Actual results:
the topology of guest cpu not same with host cpu definition from capabilities xml

Expected results:
guest cpu topology same with host cpu definition from capabilities xml when set cpu mode='host-model'

Additional info:

Comment 4 Dave Allan 2012-07-20 14:55:22 UTC
IMO this is not a bug; just because a user wants the cpu model does not mean that they want, for example, to assign all physical cores to the guest.