Bug 903089

Summary: Specify the number of cpu cores failed with cpu model Nehalem Penryn and Conroe
Product: Red Hat Enterprise Linux 7 Reporter: huiqingding <huding>
Component: qemu-kvmAssignee: Eduardo Habkost <ehabkost>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: acathrow, hhuang, huding, juzhang, michen, pbonzini, virt-maint, xfu
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: 2013-07-16 20:18:47 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: 689665    
Bug Blocks:    

Description huiqingding 2013-01-23 06:23:13 UTC
Description of problem:
Specify the number of cpu cores in qemu-kvm command line, but in guest cpu cores=1 or 0.

Version-Release number of selected component (if applicable):
cpu model of host is SandyBridge

# uname -r
3.7.0-0.30.el7.x86_64
# rpm -qa | grep qemu-kvm
qemu-kvm-1.3.0-3.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Boot gutest using the command line:
/usr/libexec/qemu-kvm -M pc-1.3 -cpu Nehalem -enable-kvm -m 2048 -smp 16,cores=4,threads=2,sockets=2 -name rhel7 -uuid 6afa5f93-2d4f-420f-81c6-e5fdddbd1c83 -drive file=rhel7-64-gui.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,serial=40c061dd-5d60-4fc5-865f-55db700407f0,cache=none,werror=stop,rerror=stop,aio=threads -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0 -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:1a:4a:42:0a:00,bus=pci.0,addr=0x3 -vnc :1 -monitor stdio
2.In the guest, cat /proc/cpuinfo

Actual results:

# cat /proc/cpuinfo | grep "physical id" | wc -l
16
# cat /proc/cpuinfo | grep "physical id" | sort | uniq
physical id : 0
physical id : 1
# cat /proc/cpuinfo | grep "cpu cores" | uniq
cpu cores : 1
cpu cores : 0
cpu cores : 1
cpu cores : 0
# cat /proc/cpuinfo | grep "siblings" | uniq
siblings : 1

Expected results:
cpu cores should be 4 and siblings should be 8.

Additional info:
Set the guest cpu model to SandyBridge or Westmere, the result is OK.
Set the guest cpu model to Penryn or Conroe, the result is fail same as Nehalem.

Comment 2 Eduardo Habkost 2013-07-16 20:18:47 UTC

*** This bug has been marked as a duplicate of bug 861209 ***