Bug 949410

Summary: xhci fails to support S4
Product: Red Hat Enterprise Linux 7 Reporter: Shaolong Hu <shu>
Component: qemu-kvmAssignee: Gerd Hoffmann <kraxel>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: amit.shah, hhuang, juzhang, knoel, michen, rbalakri, shu, 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: Environment:
Last Closed: 2015-03-04 05:24:26 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, 1103193, 1146483, 1146486    

Description Shaolong Hu 2013-04-08 06:17:03 UTC
Description of problem:
---------------------------
As subject.


Version-Release number of selected component (if applicable):
--------------------------------------------------------------
qemu-kvm-1.4.0-1.el7.x86_64


How reproducible:
------------------
100%


Steps to Reproduce:
--------------------
1.
/usr/libexec/qemu-kvm -enable-kvm -smp 4 -m 4G -name rhel6.3-64 -uuid 3f2ea5cd-3d29-48ff-aab2-23df1b6ae213 -drive file=nfs/RHEL-Server-7.0-64-virtio.qcow2,cache=none,if=none,rerror=stop,werror=stop,id=drive-virtio-disk0,format=qcow2 -device virtio-blk-pci,drive=drive-virtio-disk0,id=device-virtio-disk0 -boot menu=on -monitor stdio -chardev socket,id=s1,path=/tmp/s1,server,nowait -device isa-serial,chardev=s1 -monitor tcp::1234,server,nowait -spice disable-ticketing,port=5920 -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -vga qxl -global qxl-vga.vram_size=33554432 -qmp tcp:0:5555,server,nowait -netdev tap,script=/etc/qemu-ifup,id=netdev0,vhost=on,queues=4,vhostforce=off -device virtio-net-pci,netdev=netdev0,id=device-net0,mac=aa:54:00:11:22:33,vectors=9,mq=on -vnc :10 -device nec-usb-xhci,id=xhci -drive file=disk,if=none,id=drive-usb-0-0,media=disk,format=qcow2,cache=none,aio=native -device usb-storage,drive=drive-usb-0-0,id=usb-0-0,removable=on,bus=xhci.0,port=1 -device usb-ehci,id=ehci -drive file=disk2,if=none,id=drive-usb-0-1,media=disk,format=qcow2,cache=none,aio=native -device usb-storage,drive=drive-usb-0-1,id=usb-0-1,removable=on,bus=ehci.0,port=1 -usb -device usb-tablet,id=input1,bus=usb-bus.0,port=1 -device usb-hub,bus=usb-bus.0,port=2,id=hub

  
Actual results:
------------------
in guest, s4 fails to work, remove xhci controller and usb-storage attached on it in cmd, s4 works correctly.

Comment 2 Gerd Hoffmann 2013-05-14 14:37:26 UTC
Please retest with qemu 1.5, might be fixed meanwhile.

In case it still fails:  What happens exactly?  Guest refuses to suspend?  Guest fails to resume?  qemu crashes?  Something else?

Is the usb-storage needed to trigger or do you see failures with xhci alone too?

Comment 3 juzhang 2013-05-16 02:33:18 UTC
Hi Shu,

Please retest once our internal build which is based on qemu.15.

Comment 4 Shaolong Hu 2013-05-28 09:34:33 UTC
Test with qemu-kvm-1.5.0-2.el7.x86_64 and kernel 3.10.0-0.rc2.57.el7.x86_64 both in guest and host, this time S3/S4 won't even work without xhci, it's hard to tell what's the problem since there are tens of S3/S4 bugs, i will re-test this one after S3/S4 works again, keeps the needinfo set.

Comment 5 Gerd Hoffmann 2013-11-05 12:43:09 UTC
Ping, s3 seems to work meanwhile (at least with "-M pc").
Please see comment #2 and retest.

Comment 7 Gerd Hoffmann 2014-05-23 08:44:33 UTC
possibly related: upstream commit f1f8bc218a422081f36f0b325b3de5e6a5078b74

Comment 8 Gerd Hoffmann 2014-07-03 08:31:54 UTC
(In reply to Gerd Hoffmann from comment #5)
> Ping, s3 seems to work meanwhile (at least with "-M pc").
> Please see comment #2 and retest.

Ping²

Comment 9 juzhang 2014-07-04 01:28:03 UTC
(In reply to Gerd Hoffmann from comment #8)
> (In reply to Gerd Hoffmann from comment #5)
> > Ping, s3 seems to work meanwhile (at least with "-M pc").
> > Please see comment #2 and retest.
> 
> Ping²

Hi Shu,

Can you have a try and update the testing result in the bz?

Best Regards,
Junyi

Comment 10 Shaolong Hu 2014-07-04 09:03:05 UTC
Tried with command line in comment0, with:

-device nec-usb-xhci,id=xhci -drive file=disk,if=none,id=drive-usb-0-0,media=disk,format=qcow2,cache=none,aio=native -device usb-storage,drive=drive-usb-0-0,id=usb-0-0,removable=on,bus=xhci.0,port=1 -device usb-ehci,id=ehci -drive file=disk2,if=none,id=drive-usb-0-1,media=disk,format=qcow2,cache=none,aio=native -device usb-storage,drive=drive-usb-0-1,id=usb-0-1,removable=on,bus=ehci.0,port=1 -usb -device usb-tablet,id=input1,bus=usb-bus.0,port=1 -device usb-hub,bus=usb-bus.0,port=2,id=hub


guest fails to recover from S4 


without Usb related command line, guest recovers from S4 correctly.

Comment 11 Shaolong Hu 2014-07-04 09:03:33 UTC
Version:

qemu-kvm-rhev-1.5.3-60.el7ev.x86_64

Comment 12 Gerd Hoffmann 2014-07-04 11:35:07 UTC
Please retest with this test build:
http://people.redhat.com/ghoffman/bz1103193/

(probably doesn't change anything, test build has a bunch of usb fixes but
 nothing s4 related, but who knows, doesn't hurt to check ...)

What does "fails to recover" mean exactly?
Guest dead?  Only USB broken?  Something else?

Comment 13 Shaolong Hu 2014-07-07 05:45:53 UTC
(In reply to Gerd Hoffmann from comment #12)
> Please retest with this test build:
> http://people.redhat.com/ghoffman/bz1103193/
> 
> (probably doesn't change anything, test build has a bunch of usb fixes but
>  nothing s4 related, but who knows, doesn't hurt to check ...)
> 
> What does "fails to recover" mean exactly?
> Guest dead?  Only USB broken?  Something else?

Boot guest again, guest restarts instead of recovering from hibernate.