RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 929029 - rhel7 guest s3 wake up automatically with q35
Summary: rhel7 guest s3 wake up automatically with q35
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Marcel Apfelbaum
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: Virt-S3/S4-7.0
TreeView+ depends on / blocked
 
Reported: 2013-03-29 03:42 UTC by mazhang
Modified: 2016-09-20 04:41 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-04 05:26:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description mazhang 2013-03-29 03:42:11 UTC
Description of problem:
Do s3 test with q35, the first time enter/resume normal, but the second time guest will wake up automatically.

Version-Release number of selected component (if applicable):
host:RHEL 7.0 Alpha3
kernel:3.9.0-0.rc3.44.el7.x86_64
qemu-kvm:qemu-kvm-1.4.0-1.el7.x86_64

guest:RHEL 7.0 Alpha3
kernel:3.9.0-0.rc3.44.el7.x86_64

client: RHEL 7.0 Alpha3
virt-viewer: virt-viewer-0.5.4-2.el7.x86_64


How reproducible:
100%

Steps to Reproduce:
1.Boot a guest
/usr/libexec/qemu-kvm \
-M q35 \
-cpu Opteron_G4 \
-m 4G  \
-smp 2,sockets=1,cores=2,threads=1 \
-name rhel7 \
-uuid 990ea161-6b67-47b2-b803-19fb01d30d12 \
-smbios type=1,manufacturer='Red Hat',product='RHEV Hypervisor',version=el6,serial=koTUXQrb,uuid=feebc8fd-f8b0-4e75-abc3-e63fcdb67170 \
-k en-us \
-rtc base=localtime,clock=host,driftfix=slew \
-enable-kvm \
-monitor stdio \
-qmp tcp:0:6666,server,nowait \
-boot menu=on \
-drive file=/root/images/rhel7-new.qcow2,if=none,id=drive-scsi-disk,format=qcow2,cache=none,werror=stop,rerror=stop \
-device virtio-scsi-pci,id=scsi0,addr=0x5 \
-device scsi-disk,drive=drive-scsi-disk,bus=scsi0.0,scsi-id=0,lun=0,id=scsi-disk,bootindex=1 \
-vga qxl \
-nodefaults \
-netdev tap,id=hostnet0,downscript=no,vhost=on \
-device e1000,netdev=hostnet0,id=net0,mac=00:1a:4a:2e:28:1c,bus=pcie.0,addr=0x4,bootindex=3 \
-chardev socket,path=/tmp/qga.sock,server,nowait,id=qga0 \
-device isa-serial,chardev=qga0,id=serial0 \
-spice port=5900,disable-ticketing \
-global PIIX4_PM.disable_s3=0 \
-global PIIX4_PM.disable_s4=0

2.Try enter s3 state
(in guest)#echo mem >/sys/power/state

3.Press keyboard wake up guest.
  
Actual results:
The first time guest can enter s3 state and wake up with press keyboard, but the second time guest will wake up in a second after enter s3.

Expected results:
guest s3 state can work well always.

Additional info:
also do s3 with pc-i440fx-1.4, this problem didn't happened.

Comment 4 juzhang 2014-07-14 03:41:10 UTC
Hi Huding,

Could you handle this issue?

Best Regards,
Junyi

Comment 5 huiqingding 2014-07-15 06:02:53 UTC
(In reply to juzhang from comment #4)
> Hi Huding,
> 
> Could you handle this issue?
> 
> Best Regards,
> Junyi

I test the following version:
Host:
kernel-3.10.0-123.4.2.el7.x86_64
qemu-kvm-1.5.3-66.el7.x86_64
Guest:

Steps to Test:
1. boot a guest
# /usr/libexec/qemu-kvm \
-M q35 \
-cpu Opteron_G2 \
-m 4G  \
-smp 2,sockets=1,cores=2,threads=1 \
-name rhel7 \
-uuid 990ea161-6b67-47b2-b803-19fb01d30d12 \
-smbios type=1,manufacturer='Red Hat',product='RHEV Hypervisor',version=el6,serial=koTUXQrb,uuid=feebc8fd-f8b0-4e75-abc3-e63fcdb67170 \
-k en-us \
-rtc base=localtime,clock=host,driftfix=slew \
-enable-kvm \
-monitor stdio \
-qmp tcp:0:6666,server,nowait \
-boot menu=on \
-drive file=/mnt/rhel7-64-ga.qcow2,if=none,id=drive-scsi-disk,format=qcow2,cache=none,werror=stop,rerror=stop \
-device virtio-scsi-pci,id=scsi0,addr=0x5 \
-device scsi-disk,drive=drive-scsi-disk,bus=scsi0.0,scsi-id=0,lun=0,id=scsi-disk,bootindex=1 \
-vga qxl \
-nodefaults \
-netdev tap,id=hostnet0,downscript=no,vhost=on \
-device e1000,netdev=hostnet0,id=net0,mac=00:1a:4a:2e:28:1c,bus=pcie.0,addr=0x4,bootindex=3 \
-chardev socket,path=/tmp/qga.sock,server,nowait,id=qga0 \
-device isa-serial,chardev=qga0,id=serial0 \
-spice port=5900,disable-ticketing \
-global PIIX4_PM.disable_s3=0 \
-global PIIX4_PM.disable_s4=0 \
-serial unix:/tmp/tty0,server,nowait

2. do S3 inside guest
# pm-suspend

3. Press keyboard wake up guest

4. do S3 inside guest again
# pm-supspend

5. Press keyboard wake up guest

Actual results:
after step3, the guest can be resumed normally.
after step5, the guest cannot be resumed and the screen is always dark. Cannot use serial to connect the guest.

after step5, run "system-reset" on qemu-kvm side, qemu-kvm core dump as following:
(gdb) bt
#0  0x00007ffff2c98989 in raise () from /lib64/libc.so.6
#1  0x00007ffff2c9a098 in abort () from /lib64/libc.so.6
#2  0x00007ffff2c918f6 in __assert_fail_base () from /lib64/libc.so.6
#3  0x00007ffff2c919a2 in __assert_fail () from /lib64/libc.so.6
#4  0x00005555557669a4 in qxl_check_state (d=<optimized out>) at /usr/src/debug/qemu-1.5.3/hw/display/qxl.c:1115
#5  0x0000555555767175 in qxl_reset_state (d=d@entry=0x555556702210) at /usr/src/debug/qemu-1.5.3/hw/display/qxl.c:1123
#6  0x000055555576813b in qxl_hard_reset (d=0x555556702210, loadvm=0) at /usr/src/debug/qemu-1.5.3/hw/display/qxl.c:1160
#7  0x0000555555671eb9 in qdev_reset_one (dev=dev@entry=0x555556702210, opaque=opaque@entry=0x0) at hw/core/qdev.c:227
#8  0x00005555556717b0 in qdev_walk_children (dev=dev@entry=0x555556702210, devfn=devfn@entry=0x555555671eb0 <qdev_reset_one>, busfn=busfn@entry=0x5555556706d0 <qbus_reset_one>, opaque=opaque@entry=0x0)
    at hw/core/qdev.c:370
#9  0x0000555555671815 in qdev_reset_all (dev=dev@entry=0x555556702210) at hw/core/qdev.c:243
#10 0x00005555556a75c9 in pci_device_reset (dev=0x555556702210) at hw/pci/pci.c:180
#11 0x00005555556a7752 in pci_bus_reset (bus=0x55555669a8d0) at hw/pci/pci.c:226
#12 0x00005555556a7779 in pcibus_reset (qbus=<optimized out>) at hw/pci/pci.c:233
#13 0x0000555555671840 in qbus_walk_children (bus=bus@entry=0x55555669a8d0, devfn=devfn@entry=0x555555671eb0 <qdev_reset_one>, busfn=busfn@entry=0x5555556706d0 <qbus_reset_one>, opaque=opaque@entry=0x0)
    at hw/core/qdev.c:347
#14 0x00005555556717da in qdev_walk_children (dev=<optimized out>, devfn=devfn@entry=0x555555671eb0 <qdev_reset_one>, busfn=busfn@entry=0x5555556706d0 <qbus_reset_one>, opaque=opaque@entry=0x0)
    at hw/core/qdev.c:377
#15 0x000055555567186a in qbus_walk_children (bus=<optimized out>, devfn=0x555555671eb0 <qdev_reset_one>, busfn=0x5555556706d0 <qbus_reset_one>, opaque=0x0) at hw/core/qdev.c:354
#16 0x000055555574437d in qemu_devices_reset () at vl.c:1811
#17 qemu_system_reset (report=report@entry=true) at vl.c:1820
#18 0x00005555556021a4 in main_loop_should_exit () at vl.c:1954
#19 main_loop () at vl.c:1992
#20 main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at vl.c:4359

Comment 6 huiqingding 2014-07-15 06:03:49 UTC
> I test the following version:
> Host:
> kernel-3.10.0-123.4.2.el7.x86_64
> qemu-kvm-1.5.3-66.el7.x86_64
> Guest:
> 
The kernel of guest is kernel-3.10.0-123.el7.x86_64

> Steps to Test:
> 1. boot a guest
> # /usr/libexec/qemu-kvm \
> -M q35 \
> -cpu Opteron_G2 \
> -m 4G  \
> -smp 2,sockets=1,cores=2,threads=1 \
> -name rhel7 \
> -uuid 990ea161-6b67-47b2-b803-19fb01d30d12 \
> -smbios type=1,manufacturer='Red Hat',product='RHEV
> Hypervisor',version=el6,serial=koTUXQrb,uuid=feebc8fd-f8b0-4e75-abc3-
> e63fcdb67170 \
> -k en-us \
> -rtc base=localtime,clock=host,driftfix=slew \
> -enable-kvm \
> -monitor stdio \
> -qmp tcp:0:6666,server,nowait \
> -boot menu=on \
> -drive
> file=/mnt/rhel7-64-ga.qcow2,if=none,id=drive-scsi-disk,format=qcow2,
> cache=none,werror=stop,rerror=stop \
> -device virtio-scsi-pci,id=scsi0,addr=0x5 \
> -device
> scsi-disk,drive=drive-scsi-disk,bus=scsi0.0,scsi-id=0,lun=0,id=scsi-disk,
> bootindex=1 \
> -vga qxl \
> -nodefaults \
> -netdev tap,id=hostnet0,downscript=no,vhost=on \
> -device
> e1000,netdev=hostnet0,id=net0,mac=00:1a:4a:2e:28:1c,bus=pcie.0,addr=0x4,
> bootindex=3 \
> -chardev socket,path=/tmp/qga.sock,server,nowait,id=qga0 \
> -device isa-serial,chardev=qga0,id=serial0 \
> -spice port=5900,disable-ticketing \
> -global PIIX4_PM.disable_s3=0 \
> -global PIIX4_PM.disable_s4=0 \
> -serial unix:/tmp/tty0,server,nowait
> 
> 2. do S3 inside guest
> # pm-suspend
> 
> 3. Press keyboard wake up guest
> 
> 4. do S3 inside guest again
> # pm-supspend
> 
> 5. Press keyboard wake up guest
> 
> Actual results:
> after step3, the guest can be resumed normally.
> after step5, the guest cannot be resumed and the screen is always dark.
> Cannot use serial to connect the guest.
> 
> after step5, run "system-reset" on qemu-kvm side, qemu-kvm core dump as
> following:
> (gdb) bt
> #0  0x00007ffff2c98989 in raise () from /lib64/libc.so.6
> #1  0x00007ffff2c9a098 in abort () from /lib64/libc.so.6
> #2  0x00007ffff2c918f6 in __assert_fail_base () from /lib64/libc.so.6
> #3  0x00007ffff2c919a2 in __assert_fail () from /lib64/libc.so.6
> #4  0x00005555557669a4 in qxl_check_state (d=<optimized out>) at
> /usr/src/debug/qemu-1.5.3/hw/display/qxl.c:1115
> #5  0x0000555555767175 in qxl_reset_state (d=d@entry=0x555556702210) at
> /usr/src/debug/qemu-1.5.3/hw/display/qxl.c:1123
> #6  0x000055555576813b in qxl_hard_reset (d=0x555556702210, loadvm=0) at
> /usr/src/debug/qemu-1.5.3/hw/display/qxl.c:1160
> #7  0x0000555555671eb9 in qdev_reset_one (dev=dev@entry=0x555556702210,
> opaque=opaque@entry=0x0) at hw/core/qdev.c:227
> #8  0x00005555556717b0 in qdev_walk_children (dev=dev@entry=0x555556702210,
> devfn=devfn@entry=0x555555671eb0 <qdev_reset_one>,
> busfn=busfn@entry=0x5555556706d0 <qbus_reset_one>, opaque=opaque@entry=0x0)
>     at hw/core/qdev.c:370
> #9  0x0000555555671815 in qdev_reset_all (dev=dev@entry=0x555556702210) at
> hw/core/qdev.c:243
> #10 0x00005555556a75c9 in pci_device_reset (dev=0x555556702210) at
> hw/pci/pci.c:180
> #11 0x00005555556a7752 in pci_bus_reset (bus=0x55555669a8d0) at
> hw/pci/pci.c:226
> #12 0x00005555556a7779 in pcibus_reset (qbus=<optimized out>) at
> hw/pci/pci.c:233
> #13 0x0000555555671840 in qbus_walk_children (bus=bus@entry=0x55555669a8d0,
> devfn=devfn@entry=0x555555671eb0 <qdev_reset_one>,
> busfn=busfn@entry=0x5555556706d0 <qbus_reset_one>, opaque=opaque@entry=0x0)
>     at hw/core/qdev.c:347
> #14 0x00005555556717da in qdev_walk_children (dev=<optimized out>,
> devfn=devfn@entry=0x555555671eb0 <qdev_reset_one>,
> busfn=busfn@entry=0x5555556706d0 <qbus_reset_one>, opaque=opaque@entry=0x0)
>     at hw/core/qdev.c:377
> #15 0x000055555567186a in qbus_walk_children (bus=<optimized out>,
> devfn=0x555555671eb0 <qdev_reset_one>, busfn=0x5555556706d0
> <qbus_reset_one>, opaque=0x0) at hw/core/qdev.c:354
> #16 0x000055555574437d in qemu_devices_reset () at vl.c:1811
> #17 qemu_system_reset (report=report@entry=true) at vl.c:1820
> #18 0x00005555556021a4 in main_loop_should_exit () at vl.c:1954
> #19 main_loop () at vl.c:1992
> #20 main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>)
> at vl.c:4359

Comment 7 huiqingding 2014-07-15 06:05:59 UTC
I also use the same version and steps of comment 5 to test "-M pc", do pm-suspend for three times inside guest, the guest can be resumed normally each time.

Comment 8 Marcel Apfelbaum 2014-10-21 14:57:35 UTC
S3 not yet supported for Q35. Deferred to 7.2 for qemu-kvm-rhev.


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