Bug 892412

Summary: Fail to do S3/S4 with cirrus VGA driver on rhel7 host
Product: Red Hat Enterprise Linux 7 Reporter: Sibiao Luo <sluo>
Component: qemu-kvmAssignee: Gerd Hoffmann <kraxel>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 7.0CC: chayang, dyuan, flang, gsun, hhuang, imammedo, jcody, juli, juzhang, knoel, kraxel, kzhang, michen, pasteur, qiguo, qzhang, sluo, virt-bugs, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1108963 1108966 (view as bug list) Environment:
Last Closed: 2015-01-05 08:57:54 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, 1108963, 1108966    
Attachments:
Description Flags
after S4 log
none
screen_shot_can't-resume-after-s4
none
windows8.1-64 guest GUI hang after S3 none

Description Sibiao Luo 2013-01-07 03:15:09 UTC
Description of problem:
boot rhel7 guest on rhel7 host, but fail to do S3/S4. 
BTW, 
1.it can do S3/S4 successfully when boot rhel6.4 guest on the rhel7 host with the same qemu-kvm command line.
2.it can do S3/S4 successfully in rhel7 host.

Version-Release number of selected component (if applicable):
host info:
# uname -r && rpm -q qemu-kvm
3.6.0-0.29.el7.x86_64
qemu-kvm-1.2.0-21.el7.x86_64
gust info:
# uname -r
3.6.0-0.29.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.boot rhel7 guest on rhel rhel7 host with '-global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0'.
2.cat the /sys/power/state in guest.
# cat /sys/power/state 
mem disk
3.do S3/S4 in guest.
# pm-suspend/pm-hibernate

Actual results:
after step 3, cannot do S3/S4.
- for S4, the guest kernel log output as following:
# nc -U /tmp/ttyS0 
[  OK  ] Started Show Plymouth Boot Screen.
[  OK  ] Reached target Basic System.

Expected results:
it can do S3/S4 successfully when boot rhel7 guest on rhel rhel7 host.

Additional info:

Comment 1 Sibiao Luo 2013-01-07 03:17:34 UTC
my qemu-kvm command line:
# /usr/libexec/qemu-kvm -M pc-1.2 -cpu SandyBridge -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -no-kvm-pit-reinjection -usb -device usb-tablet,id=input0 -name virtual-blk-device -uuid 990ea161-6b67-47b2-b803-19fb01d30d30 -rtc base=localtime,clock=host,driftfix=slew -device virtio-serial-pci,id=virtio-serial0,max_ports=16,vectors=0,bus=pci.0,addr=0x3 -chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait -device virtserialport,chardev=channel1,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port1 -chardev socket,id=channel2,path=/tmp/helloworld2,server,nowait -device virtserialport,chardev=channel2,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port2 -drive file=/home/RHEL-7-Server-x86_64.qcow2,if=none,id=drive-virtio-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop -device virtio-blk-pci,vectors=0,bus=pci.0,addr=0x4,scsi=off,drive=drive-virtio-disk,id=virtio-disk,bootindex=1 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,mac=34:40:B5:9E:D3:90,bus=pci.0,addr=0x5 -device virtio-balloon-pci,id=ballooning,bus=pci.0,addr=0x6 -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -drive file=/home/my-data-disk.qcow2,if=none,id=drive-data-disk,format=qcow2,cache=none,werror=stop,rerror=stop -device virtio-scsi-pci,id=scsi0,vectors=0,bus=pci.0,addr=0x7 -device scsi-hd,ver=sluo,drive=drive-data-disk,bus=scsi0.0,id=data-disk -device usb-ehci,id=ehci,bus=pci.0,addr=0x10 -chardev spicevmc,name=usbredir,id=usbredirchardev1 -device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,bus=ehci.0,debug=3 -k en-us -boot menu=on -qmp tcp:0:4444,server,nowait -serial unix:/tmp/ttyS0,server,nowait -monitor stdio -vnc :1

Comment 3 Qian Guo 2013-02-26 09:35:52 UTC
In my test, this bug just occurs when using "-vga cirrus", and the S4 works well.

Version-Release number of selected component (if applicable):
host info:
# uname -r && rpm -q qemu-kvm
3.8.0-0.37.el7.x86_64
qemu-kvm-1.3.0-5.el7.x86_64

guest info:
# uname -r
3.6.0-0.36.el7.x86_64

How reproducible:
100%

Steps 
1.boot rhel7 guest 
2.cat the /sys/power/state in guest.
# cat /sys/power/state 
mem disk
3.do S3/S4 in guest.
# pm-suspend/pm-hibernate

Actual results:

S3 is not work and S4 works well.

I test w/ cirrus, qxl and std, just cirrus hit this problem, so I think it is a bug related w/ cirrus.

My guest cli list below:

# /usr/libexec/qemu-kvm  -M pc-1.3 -enable-kvm -m 1024 -smp 2,sockets=2,cores=1,threads=1 -uuid `uuidgen` -no-user-config -nodefaults -rtc base=utc  -device usb-ehci,id=ehci -drive file=/home/rhel7_test2.qcow2,if=none,id=drive-virtio-0-0,media=disk,format=qcow2,werror=stop,rerror=stop -device virtio-scsi-pci,id=scsi,bus=pci.0,addr=0x8 -device scsi-hd,drive=drive-virtio-0-0,id=drive-scsi -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device e1000,netdev=hostnet0,id=net0,mac=52:54:00:60:3f:29,bus=pci.0 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0   -vga std  -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 -device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=0x6 -chardev socket,id=channel0,path=/tmp/tty0,server,nowait -device virtserialport,chardev=channel0,name=org.linux-kvm.port.1,bus=virtio-serial0.0,id=port1 -chardev socket,path=/tmp/qga.sock,server,nowait,id=qga0 -device  virtio-serial -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 -monitor stdio   -boot menu=on,order=c -vnc :10 -vga cirrus -chardev spicevmc,name=usbredir,id=usbredirchardev1 -device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,bus=ehci.0,debug=3

Comment 4 Chao Yang 2013-03-18 09:43:55 UTC
Here is an update on s3/s4 issue tested with qemu-kvm-1.4.0-1.el7.x86_64, guest kernel 3.8.0-0.40.el7.x86_64, qxl in cli. But my case is with VFs assigned. The test result is: cannot suspend guest to memory or disk. 

Suspend to disk:
---------------
Steps:
1. echo disk to /sys/power/state
Result:
qemu-kvm didn't quit.
 
from guest dmesg:
[   59.612586] PM: Syncing filesystems ... done.
[   59.619736] Freezing user space processes ... (elapsed 0.02 seconds) done.
[   59.645113] PM: Preallocating image memory... done (allocated 252897 pages)
[   59.881745] PM: Allocated 1011588 kbytes in 0.23 seconds (4398.20 MB/s)
[   59.883509] Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
[   59.896313] Suspending console(s) (use no_console_suspend to debug)

Suspend to memory:
-----------------
Steps:
1. echo mem to /sys/power/state
2. (qemu) info status
VM status: paused (suspended)
3. (qemu) system_wakeup 
(qemu) main_channel_handle_parsed: agent start

(qemu) info status
VM status: running

Result:
qemu-kvm didn't resume correctly. It hung at screen "Bochs VBE Display Adapter enabled". I got lots of:
(qemu) __spice_char_device_write_buffer_get: internal buf is not available
__spice_char_device_write_buffer_get: internal buf is not available
__spice_char_device_write_buffer_get: internal buf is not available
....

from guest dmesg:
[  152.650585] PM: Syncing filesystems ... done.
[  153.612251] Freezing user space processes ... (elapsed 0.02 seconds) done.
[  153.637348] Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
[  153.654389] Suspending console(s) (use no_console_suspend to debug)



CLI:
/usr/libexec/qemu-kvm -name SR-IOV -M pc-i440fx-1.4 -cpu Nehalem -enable-kvm -m 4096 -smp 4,sockets=4,cores=1,threads=1 -uuid 8caf1895-52ef-4231-e4ec-73171b8b265b -nodefaults -rtc base=utc -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-scsi-pci,id=scsi0,bus=pci.0 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 -drive file=/root/sriov.raw,if=none,id=drive-scsi0-0-0,format=raw -device scsi-hd,bus=scsi0.0,scsi-id=0,drive=drive-scsi0-0-0,id=scsi0-0-0,bootindex=2 -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:6c:08:46,bus=pci.0 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev spicevmc,id=charchannel0,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -device usb-tablet,id=input0 -spice port=5900,disable-ticketing,seamless-migration=on -vga qxl -global qxl-vga.ram_size=67108864 -global qxl-vga.vram_size=67108864 -device intel-hda,id=sound0,bus=pci.0 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -balloon none -monitor stdio -device vfio-pci,host=06:1e.6,id=vf_061e6 -device vfio-pci,host=06:1f.4,id=vf_061f4 -device vfio-pci,host=06:1f.2,id=vf_061f2 -device vfio-pci,host=06:1f.0,id=vf_061f0  -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -serial unix:/tmp/test,server,nowait

Comment 5 langfang 2013-03-19 10:03:55 UTC
(In reply to comment #4)
> Here is an update on s3/s4 issue tested with qemu-kvm-1.4.0-1.el7.x86_64,
> guest kernel 3.8.0-0.40.el7.x86_64, qxl in cli. But my case is with VFs
> assigned. The test result is: cannot suspend guest to memory or disk. 
> 


HI,chayang
  I have tried to test use your CLI but remove vfio-pci device. Hit another bug:

Bug 920017 - rhel7 guest will call trace after resume from S3/S4 in rhel7 host 
https://bugzilla.redhat.com/show_bug.cgi?id=920017


So i think maybe vfio-pci device trigger the problem  you hit.

MY Test:
Host:
# uname -r
3.8.0-0.40.el7.x86_64
# rpm -q qemu-kvm
qemu-kvm-1.4.0-1.el7.x86_64

Guest:
3.8.0-0.40.el7.x86_64

Results:
bug 920017

MY CLI:

/usr/libexec/qemu-kvm -name SR-IOV -M pc-i440fx-1.4 -cpu Penryn -enable-kvm -m 4096 -smp 4,sockets=4,cores=1,threads=1 -uuid `uuidgen` -nodefaults -rtc base=utc -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-scsi-pci,id=scsi0,bus=pci.0 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 -drive file=/home/rhel7-64-gui_2.qcow2,if=none,id=drive-scsi0-0-0,format=qcow2 -device scsi-hd,bus=scsi0.0,scsi-id=0,drive=drive-scsi0-0-0,id=scsi0-0-0,bootindex=2 -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=32:44:10:62:08:46,bus=pci.0 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev spicevmc,id=charchannel0,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -device usb-tablet,id=input0 -spice port=5900,disable-ticketing,seamless-migration=on -vga qxl -global qxl-vga.ram_size=67108864 -global qxl-vga.vram_size=67108864 -device intel-hda,id=sound0,bus=pci.0 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -balloon none -monitor stdio -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -serial unix:/tmp/tty0,server,nowait

Comment 6 langfang 2013-03-21 08:28:31 UTC
Test S3/S4 problem:
 
HOST Guest tree:
http://download.englab.nay.redhat.com/pub/rhel/rel-eng/RHEL-7.0-20130306.0/compose/Server/x86_64/os

Host:
# uname -r
3.8.0-0.40.el7.x86_64
# rpm -q qemu-kvm
qemu-kvm-1.4.0-1.el7.x86_64

Guest:3.8.0-0.40.el7.x86_64

Results:

___________________________________________________
|host    |    guest (RHEL7)      |   S3  |   S4   |
|________|_______________________|_______|________|
|        |  -spice... -vga cirrus| failed| pass   |
|        |_______________________|_______|________|
|        |  -spice...-vga qxl/std| pass  | pass   |
|RHEL7   |_______________________|_______|________|
|        |   -vnc... -vga cirrus | faild | pass   |
|        |_______________________|_______|________|
|        |   -vnc... -vga qxl/std| pass  |  pass  |
|________|_______________________|_______|________| 




failed: after do S3,will see dark screen,can not resume guest
  pass: after do S3/S4,guest resume sucessfully.

Addtional info:about comment5,do S3/S4 call trace problem,please track  bug920017.

Comment 7 Qian Guo 2013-04-24 10:15:30 UTC
Test w/ vnc$std when using rhel7 guest hit following issue:succeed change to S3 state when do 'pm-suspend' inside guest, 

Components:
# uname -r
3.9.0-0.rc7.53.el7.x86_64

# rpm -q qemu-kvm
qemu-kvm-1.4.0-2.1.el7.x86_64


Steps:
1.Guest cli:
# /usr/libexec/qemu-kvm -cpu host -m 4G -smp 4,sockets=1,cores=4,threads=1 -M pc -enable-kvm  -name win2012  -drive file=/home/rhel7cp2.qcow3,if=none,format=qcow2,werror=stop,rerror=stop,media=disk,id=drive-scsi0-disk0 -device virtio-scsi-pci,id=scsi0,addr=0x4 -device scsi-hd,scsi-id=0,lun=0,bus=scsi0.0,drive=drive-scsi0-disk0,id=virtio-disk0 -nodefaults -nodefconfig -monitor stdio   -netdev tap,id=bd,script=/etc/qemu-ifup,ifname=qiguo1 -device e1000,netdev=bd,mac=54:52:1a:46:0b:02,id=vnic1  -vnc :20 -vga std  -boot menu=on -device virtio-balloon-pci,id=balloon1

1.Do S3 inside guest:
(qemu) info status
VM status: paused (suspended)

2.Press keyboard or do 'system-wakeup'

(qemu) info status
VM status: running

Results:
From the vnc window of guest, still in darksreen, but if I try to access tty2 (send key :ctrl+alt+f2), succeed, and then send key (ctrl+alt+f1), resumes well.

Addional info:
not hit this issue w/ qxl 

and like comment #6 , could not do S3 when using cirrus.

Comment 8 langfang 2013-07-05 08:23:12 UTC
Test this bug on latest version

Host:
# uname -r 
3.10.0-0.rc7.64.el7.x86_64
# rpm -q qemu-kvm
qemu-kvm-1.5.1-2.el7.x86_64

Guest:
Kernel 3.10.0-0.rc7.64.el7.x86_64


Senario 1)rhel guest

1.Boot rhel7 guest(ide-drive) without others devices
 #/usr/libexec/qemu-kvm -M pc-i440fx-rhel7.0.0 -cpu SandyBridge -enable-kvm -m 4096 -smp 4,sockets=2,cores=2,threads=1 -no-kvm-pit-reinjection -name flang -uuid 74145308-8253-4f4a-a2ec-316aaf501a0f -rtc base=localtime,clock=host,driftfix=slew -drive file=/root/flang/RHEL-7.0-20130628.0-Server-x86_64.qcow3,format=qcow2,if=none,id=drive-ide0-0-0,format=qcow2,cache=none -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -k en-us -boot menu=on -serial unix:/tmp/ttyS0,server,nowait -spice port=5900,disable-ticketing -vga std -monitor stdio

2.Do S3
In guest:#pm-suspend
(qemu)system_wakeup
3.Do S4
In guest:#pm-hibernate


Results:
After step 2:

#nc -U /tmp/ttyS0
...
[  115.661215] PM: Syncing filesystems ... done.
[  115.776390] Freezing user space processes ... (elapsed 0.01 seconds) done.
[  115.788706] Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
[  115.800637] Suspending console(s) (use no_console_suspend to debug)

(qemu) info status
VM status: paused (suspended)

Then tried wakeup

(qemu) system_wakeup

#nc -U /tmp/ttyS0
...
[  115.661215] PM: Syncing filesystems ... done.
[  115.776390] Freezing user space processes ... (elapsed 0.01 seconds) done.
[  115.788706] Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
[  115.800637] Suspending console(s) (use no_console_suspend to debug)
[  115.801635] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[  115.802384] sd 0:0:0:0: [sda] Stopping disk
[  115.804393] PM: suspend of devices complete after 2.782 msecs
[  115.804428] PM: late suspend of devices complete after 0.034 msecs
[  115.804832] PM: noirq suspend of devices complete after 0.402 msecs
[  115.804841] ACPI: Preparing to enter system sleep state S3
[  115.804867] PM: Saving platform NVS memory
[  115.804867] Disabling non-boot CPUs ...
[  115.804936] Unregister pv shared memory for cpu 1
[  115.806548] smpboot: CPU 1 is now offline
[  115.806784] Unregister pv shared memory for cpu 2
[  115.808246] smpboot: CPU 2 is now offline
[  115.808432] Unregister pv shared memory for cpu 3
[  115.809812] smpboot: CPU 3 is now offline
[  115.811004] kvm-clock: cpu 0, msr 1:1ff85001, primary cpu clock, resume
[  115.811004] ACPI: Low-level resume complete
[  115.811004] ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S0_] (20130328/hwxface-568)
[  115.811004] PM: Restoring platform NVS memory
[  115.811004] Enabling non-boot CPUs ...
[  115.811004] smpboot: Booting Node 0 Processor 1 APIC 0x1
[  115.806228] kvm-clock: cpu 1, msr 1:1ff85041, secondary cpu clock
[  115.884280] KVM setup async PF for cpu 1
[  115.884286] kvm-stealtime: cpu 1, msr 11fc8df00
[  115.884421] CPU1 is up
[  115.884451] smpboot: Booting Node 0 Processor 2 APIC 0x2
[  115.807974] kvm-clock: cpu 2, msr 1:1ff85081, secondary cpu clock
[  115.916141] KVM setup async PF for cpu 2
[  115.916147] kvm-stealtime: cpu 2, msr 11fd0df00
[  115.916235] CPU2 is up
[  115.916261] smpboot: Booting Node 0 Processor 3 APIC 0x3
[  115.809238] kvm-clock: cpu 3, msr 1:1ff850c1, secondary cpu clock
[  115.929712] KVM setup async PF for cpu 3
[  115.929718] kvm-stealtime: cpu 3, msr 11fd8df00
[  115.929801] CPU3 is up
[  115.930130] ACPI: Waking up from system sleep state S3
[  115.935081] PM: noirq resume of devices complete after 4.876 msecs
[  115.935203] PM: early resume of devices complete after 0.047 msecs
[  115.935345] pci 0000:00:01.0: PIIX3: Enabling Passive Release
[  116.088479] ata1.00: configured for MWDMA2
[  116.088610] sd 0:0:0:0: [sda] Starting disk
[  116.088922] PM: resume of devices complete after 153.715 msecs
[  116.126826] Restarting tasks ... done.
[  116.304297] IPv6: ADDRCONF(NETDEV_UP): ens3: link is not ready
[  118.304554] e1000: ens3 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
[  118.305745] IPv6: ADDRCONF(NETDEV_CHANGE): ens3: link becomes ready


After step 3: Pass
#cat /tmp/ttyS0
...
[  112.750320] PM: Using 3 thread(s) for compression.
[  112.750320] PM: Compressing and saving image data (250726 pages)...
[  112.751952] PM: Image saving progress:   0%
[  112.855161] PM: Image saving progress:  10%
[  112.951309] PM: Image saving progress:  20%
[  113.057384] PM: Image saving progress:  30%
[  113.178989] PM: Image saving progress:  40%
[  113.549522] PM: Image saving progress:  50%
[  113.993882] PM: Image saving progress:  60%
[  114.529349] PM: Image saving progress:  70%
[  115.297878] PM: Image saving progress:  80%
[  115.850132] PM: Image saving progress:  90%
[  116.344906] PM: Image saving progress: 100%
[  118.411145] PM: Image saving done.
[  118.412247] PM: Wrote 1002904 kbytes in 5.65 seconds (177.50 MB/s)
[  118.621582] PM: S|
[  118.720760] Suspending console(s) (use no_console_suspend to debug)

Addtional info : 
1)After step3 entire log ,see attachment(after-pm-hiernate.txt)
2)I also test guest(init 3 )-->S3-->have same problem.

Senario 2) win7(64) guest

1.Boot win7 guest
 #/usr/libexec/qemu-kvm  -M pc-i440fx-rhel7.0.0 -cpu SandyBridge -enable-kvm -m 4096 -smp 4,sockets=2,cores=2,threads=1 -no-kvm-pit-reinjection -name flang -uuid `uuidgen` -rtc base=localtime,clock=host,driftfix=slew -drive file=/root/flang/win7-64-virtio.qcow2,format=qcow2,if=none,id=drive-ide0-0-0,format=qcow2,cache=none -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0  -k en-us -boot menu=on -serial unix:/tmp/ttyS0,server,nowait -spice port=5900,disable-ticketing -vga qxl -monitor stdio
2.Do S3
3.Do S4

Resutls: 
After step 2: successfully
After step 3: successfully

Summarize my test:
Host:RHEL7 
__________________________________________________
|guest   |        disk           |   S3  |   S4   |
|________|_______________________|_______|________|
|        |                       |       |        |
|RHEL7(64|      ide-drive        | Fail  | Pass   |
|        |                       |       |        |
|________|_______________________|_______|________|
|        |                       |       |        |
|Win7(64)|       ide-drive       |  Pass | Pass   |
|        |                       |       |        |
|________|_______________________|_______|________|

Comment 9 langfang 2013-07-05 08:29:25 UTC
Created attachment 769137 [details]
after S4  log

Comment 10 guo jiang 2013-07-09 05:21:43 UTC
Test win2012 guest on rhel7 host

Components:
#uname -r
3.10.0-0.rc7.64.el7.x86_64

#rpm -q qemu-kvm
qemu-kvm-1.5.1-2.el7.x86_64

Steps:
1.Boot win2012 guest(ide-drive) with CLI:
/usr/libexec/qemu-kvm -cpu SandyBridge -M pc -smp 8,cores=8 -m 6G -usb -device usb-tablet -drive file=win2012.qcow3,if=none,cache=unsafe,media=disk,format=qcow2,id=drive-ide0-0-1 -device ide-drive,id=ide1,drive=drive-ide0-0-1,bus=ide.1 -netdev tap,sndbuf=0,id=hostnet0,script=/etc/qemu-ifup -device e1000,netdev=hostnet0,mac=00:52:3c:34:21:11,id=net0 -uuid adb7d948-9ac4-4172-9cba-d31f5b0ec55a -global kvm-pit.lost_tick_policy=discard -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -chardev socket,id=aaa,path=/tmp/monitor-win2012-serial,server,nowait -mon chardev=aaa,mode=readline -name win2012-serial-1.6.5-5 -vnc :1 -vga cirrus  -enable-kvm  -monitor stdio

2.do S4 and resume

3.do
  (qemu)system_powerdown and resume

Results:
Host:RHEL7
After S4/system_powerdown, guest failed to do resume, always suspending on the start status(see screen_shot_can't-resume-after-s4)
(qemu)info status
 VM staus:running

___________________________________________________________
|guest   |        disk           |   S4   |system_powerdown|
|________|_______________________|________|________________|           
|        |                       |        |                |
|Win2012 |       ide-drive       | Fail   |   Fail         |
|        |                       |        |                |
|________|_______________________|________|________________|

Comment 11 guo jiang 2013-07-09 05:22:57 UTC
Created attachment 770790 [details]
screen_shot_can't-resume-after-s4

Comment 12 guo jiang 2013-07-09 05:57:13 UTC
(In reply to guo jiang from comment #10)
Guest hit the same issue when boot guest with the same CLI After guest doing "shutdown".

Comment 13 Jun Li 2013-09-29 09:02:08 UTC
Test win8.1-64 guest on rhel7 host

Components:
3.10.0-29.el7.x86_64
qemu-kvm-rhev-1.5.3-7.el7.x86_64

Steps:
1.Boot win8.1-64 guest with CLI:
# /usr/libexec/qemu-kvm -m 2G -smp 2 -cpu SandyBridge \
-usb -device usb-tablet \
-drive file=/home/win8.1-64-ide.qcow2_v3,format=qcow2,index=0,if=none,id=drive-virtio-disk1,media=disk,cache=none,werror=stop,aio=native \
-device virtio-scsi-pci,id=bus0 -device scsi-hd,bus=bus0.0,drive=drive-virtio-disk1,id=virtio-disk1 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device e1000,netdev=hostnet0,mac=24:be:05:0c:1e:88,bus=pci.0,addr=0x4 -uuid dbde9e26-140c-4efb-8d58-4b1ca0251cdb -rtc base=localtime -no-kvm-pit-reinjection -monitor stdio -name win7-64-scsi -spice disable-ticketing,port=5932 -vga qxl -global qxl-vga.revision=3 -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -qmp tcp:0:4445,server,nowait  \
-bios /usr/share/seabios/bios.bin -device virtio-scsi-pci,bus=pci.0,id=scsi0 -drive file=/home/test3.qcow2_v3,format=qcow2,if=none,media=disk,aio=native,werror=stop,rerror=stop,id=scsi0 -device scsi-hd,bus=scsi0.0,drive=scsi0,id=scsi1 \
-drive file=/root/virtio-win-prewhql-0.1-72/virtio-win-prewhql-0.1.iso,if=none,media=cdrom,format=raw,aio=native,id=drive-ide1-0-2 -device ide-drive,drive=drive-ide1-0-2,id=ide1-0-2,bus=ide.0,unit=0

2. do S3 and resume
3. system_reset and do S4 and resume.

Results:
After 2, guest can not resume from S3, windows GUI hang, please ref attachment picture. But ping guest is successful. 
After 3, qemu-kvm quit with the following message:
(qemu) info /etc/qemu-ifdown: could not launch network script

Comment 14 Jun Li 2013-09-29 09:04:11 UTC
Created attachment 804644 [details]
windows8.1-64 guest GUI hang after S3

Comment 22 Gerd Hoffmann 2014-12-15 07:23:55 UTC
Please retest with RHEL-7.1 (both host+guest), cirrus s3 should be fixed there.

Comment 23 Sibiao Luo 2014-12-24 02:55:00 UTC
(In reply to Gerd Hoffmann from comment #22)
> Please retest with RHEL-7.1 (both host+guest), cirrus s3 should be fixed
> there.

I tried the latest rhel7.1(guest/host) with cirrus vga for repeat tree times S3 which can resume successfully without any problem.

# /usr/libexec/qemu-kvm -M pc...-vnc :1 -vga cirrus

host info:
# uname -r && rpm -q qemu-kvm
3.10.0-219.el7.x86_64
qemu-kvm-1.5.3-84.el7.x86_64
guest info:
# uname -r
3.10.0-219.el7.x86_64

Best Regards,
sluo

Comment 24 Gerd Hoffmann 2015-01-05 08:57:54 UTC

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