Bug 806764 - Windows guest cpu number is not updated inside guest after hot plug a vcpu
Windows guest cpu number is not updated inside guest after hot plug a vcpu
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.3
Unspecified Unspecified
high Severity high
: rc
: ---
Assigned To: Igor Mammedov
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-26 03:56 EDT by Qunfang Zhang
Modified: 2012-03-30 04:06 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-03-30 03:55:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Qunfang Zhang 2012-03-26 03:56:54 EDT
Description of problem:
Boot a win2k8r2 guest with only 1 vcpu, and then hotplug the 2nd, the 3rd one for it. '(qemu)info cpus' shows the vcpu number increases but inside guest, the cpu number is still one in the device manager or task manager.

Version-Release number of selected component (if applicable):
kernel-2.6.32-254.el6.x86_64
qemu-kvm-0.12.1.2-2.257.el6.x86_64
seabios-0.6.1.2-13.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Boot a guest with 1 vcpu.
/usr/libexec/qemu-kvm -M rhel6.3.0 -cpu Conroe -enable-kvm -m 2G -smp 1 -name 2K8R2 -uuid 11c7397b-dee5-44b2-bed9-fc44e70108ce -device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=0x4 -drive file=/dev/vg-54/lvtest,if=none,id=drive-virtio-disk0,format=raw,cache=none,werror=stop,rerror=stop,aio=native -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0 -drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:1a:2a:15:10:18,bus=pci.0,addr=0x3 -chardev socket,id=charchannel0,path=/tmp/qzhang-test,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.rhevm.vdsm -spice port=5930,disable-ticketing -vga qxl -global qxl-vga.vram_size=33554432 -usb -device usb-tablet,id=input0 -device virtio-balloon-pci,id=balloon0,addr=0x7 -monitor stdio -boot c -rtc-td-hack

2. (qemu) info cpus 
   * CPU #0: pc=0x00000000000ca45c (halted) thread_id=19263 
   (qemu)

3. Hot plug 1 cpu:
(qemu) cpu_set 1 online
(qemu) info cpus 
* CPU #0: pc=0xfffff880024cc9c2 (halted) thread_id=19263 
  CPU #1: pc=0x00000000000ffff0 thread_id=19300 
(qemu) 

4. Check the vcpu number inside guest, by opening device manager and task manager.

5. Restart guest and repeat step 4.
  
Actual results:
After step 4,There's still 1 cpu displayed in guest
After step 5, There will be 2 vcpu after a reboot.

Expected results:
The vcpu number inside guest should be updated in time without reboot guest.

Additional info:
There's 4 physical cpu in host:

processor	: 3
vendor_id	: GenuineIntel
cpu family	: 6
model		: 23
model name	: Intel(R) Core(TM)2 Quad CPU    Q9550  @ 2.83GHz
stepping	: 10
cpu MHz		: 2826.461
cache size	: 6144 KB
physical id	: 0
siblings	: 4
core id		: 3
cpu cores	: 4
apicid		: 3
initial apicid	: 3
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm dts tpr_shadow vnmi flexpriority
bogomips	: 5652.22
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:
Comment 1 Qunfang Zhang 2012-03-26 03:58:24 EDT
Confirm with xfu who tested RHEL guest, RHEL guest works well, that means the vcpu will be updated inside guest immediately after hot plug in qemu monitor.
Comment 3 Qunfang Zhang 2012-03-26 05:15:43 EDT
Update:
Tested with a win2k8r2-64 datacenter edition.
Comment 4 Igor Mammedov 2012-03-26 10:30:05 EDT
Qunfang,

It works for me with win2k8r2-64-sp1 and whatever fc16 seabios has.

BTW: I didn't see maxcpus on qemu cmd line, something like this:
  -smp 2,maxcpus=4

Could you re-test with maxcpus, pls?
Comment 5 FuXiangChun 2012-03-30 00:35:07 EDT
(In reply to comment #4)
> Qunfang,
> 
> It works for me with win2k8r2-64-sp1 and whatever fc16 seabios has.
> 
> BTW: I didn't see maxcpus on qemu cmd line, something like this:
>   -smp 2,maxcpus=4
> 
> Could you re-test with maxcpus, pls?

It works if using maxcpus option for win2k8r2-64-sp1 guest.
Comment 6 Igor Mammedov 2012-03-30 03:55:30 EDT
maxcpus should be always used if one intends to use cpu-hotplug, so that bios could construct acpi tables/objects correctly for it.

Note You need to log in before you can comment on or make changes to this bug.