Bug 850927

Summary: QMP: two events related issues on S3 wakeup
Product: Red Hat Enterprise Linux 6 Reporter: Luiz Capitulino <lcapitulino>
Component: qemu-kvmAssignee: Luiz Capitulino <lcapitulino>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4CC: acathrow, areis, bsarathy, dyasny, flang, juzhang, mkenneth, qzhang, shuang, sluo, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-0.12.1.2-2.311.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 07:38:45 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:

Description Luiz Capitulino 2012-08-22 18:58:16 UTC
Description of problem:

There are two issues related to QMP events on S3 wakeup:

 1. A spurious RESET event is emitted
 2. The semantics of when the WAKEUP event is emitted is not very clear

The severity of these problems are very small, but as they have been fixed upstream it's a good idea to backport the fixes.


Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.307.el6

How reproducible:

Only the spurious RESET can be reproduced.

Steps to Reproduce:
1. Start qemu-kvm with a QMP socket

qemu-kvm [...] -qmp tcp:0:4444

2. Connect, and do capabilities negotiation

{ "execute": "qmp_capabilities" }

3. In the guest, do:

# echo mem > /sys/power/state

4. Resume by pressing a keyboard key or running the system_wakeup command

5. Observe the events that have been emitted
  
Actual results:

A RESET event is emitted.

Expected results:

No RESET event is emitted.

Comment 1 Luiz Capitulino 2012-08-27 17:11:04 UTC
Patches posted downstream (last week).

Comment 4 langfang 2012-10-09 05:40:22 UTC
verify this bug as follow version:
host:
# uname -r
2.6.32-315.el6.x86_64
# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.320.el6.x86_64
# rpm -q seabios
seabios-0.6.1.2-23.el6.x86_64
guest:
2.6.32-279.el6.x86_64

steps:
1./usr/libexec/qemu-kvm -m 2G -smp 2 -cpu Penryn -rtc base=localtime,clock=host,driftfix=slew -drive file=/home/RHEL-Server-6.3-64-virtio.qcow2,format=qcow2,if=none,id=drive-ide0-0-0,werror=stop,rerror=stop,cache=none -device ide-drive,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -netdev tap,id=hostnet0,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,mac=04:21:19:29:28:33,bus=pci.0,addr=0x4,id=net0 -boot c -uuid a0afffcd-f989-45f3-8422-32252bfe4b31 -rtc-td-hack -monitor stdio -name rhel6.4 -vnc :5  -usbdevice tablet -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -qmp tcp:0:4444,server,nowait
2.in guest
#echo mem >/sys/power/state


results:

Connected to 10.66.4.183.
Escape character is '^]'.
{"QMP": {"version": {"qemu": {"micro": 1, "minor": 12, "major": 0}, "package": "(qemu-kvm-0.12.1.2)"}, "capabilities": []}}
{"execute":"qmp_capabilities"}
{"return": {}}
{"timestamp": {"seconds": 1349757847, "microseconds": 488577}, "event": "SUSPEND"} --->for S3
{"timestamp": {"seconds": 1349757851, "microseconds": 3171}, "event": "WAKEUP"}
---->not emit RESET event.

Comment 6 errata-xmlrpc 2013-02-21 07:38:45 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0527.html