Bug 968211

Summary: hot-added CPUs will be missed after resume from S4
Product: Red Hat Enterprise Linux 7 Reporter: FuXiangChun <xfu>
Component: qemu-kvmAssignee: Igor Mammedov <imammedo>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.0CC: acathrow, hhuang, rhod, virt-maint
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-05-30 09:44:48 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: 923626    

Description FuXiangChun 2013-05-29 08:40:03 UTC
Description of problem:
Hotplug a cpu to guest via qmp command cpu-add, then do S4 and resume it.  hot-added CPUs will be missed.

Version-Release number of selected component (if applicable):
# uname -r
3.10.0-0.rc2.57.el7.x86_64

# rpm -qa|grep qemu-kvm
qemu-kvm-1.5.0-2.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Boot RHEL7.0 guest
/usr/libexec/qemu-kvm -cpu Opteron_G2 -M pc-i440fx-1.5 -enable-kvm -m 4G -smp 1,sockets=127,cores=2,threads=1,maxcpus=254 -no-kvm-pit-reinjection -usb -device usb-tablet,id=input0 -name sluo-test -uuid `uuidgen` -rtc base=localtime,clock=host,driftfix=slew -drive file=/home/RHEL-7.0-20130403.0_x86_64.qcow3bk1,if=none,id=drive-system-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-system-disk -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,mac=08:2e:5f:0a:0d:b3,bus=pci.0,addr=0x5,bootindex=2 -device virtio-balloon-pci,id=ballooning,bus=pci.0,addr=0x6 -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -k en-us -vnc :2 -spice port=5931,disable-ticketing -boot menu=on -vga qxl -global qxl-vga.vram_size=67108864 -serial unix:/tmp/ttyS0,server,nowait -qmp tcp:0:4444,server,nowait -monitor stdio
(qemu) info cpus
* CPU #0: pc=0xffffffff81040f06 (halted) thread_id=3642


2.Hotplug a CPUs via qmp script
CPU #0: pc=0xffffffff81040f06 (halted) thread_id=3642
CPU #1: pc=0x00000000fffffff0 thread_id=3651

3.enable online it in guest

4.do S4 inside
 echo disk >/sys/power/state

5. resume it 

Actual results:
(qemu) info cpus
* CPU #0: pc=0xffffffff81040f06 (halted) thread_id=3668

Expected results:
hot-added cpu work well inside guest

Additional info:
if this is bug, then I will clone it to rhel6.4.

Comment 1 Igor Mammedov 2013-05-29 13:55:31 UTC
Could you add here qemu CLI after resume?

Comment 2 FuXiangChun 2013-05-30 01:14:29 UTC
It is the same CLI with comment0

Comment 4 Igor Mammedov 2013-05-30 09:44:48 UTC
You violate your own test plan
 -smp should be changed when you do resume to reflect actual CPU count when tested manually.

If it happens with libvirt feel free to reassign to RHEL7 libvirt component.
Here is a corresponding RHEL6 BZ https://bugzilla.redhat.com/show_bug.cgi?id=808463