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 902150 - [virtio-win][serial]virtio-serial driver does not work after S3& s4
Summary: [virtio-win][serial]virtio-serial driver does not work after S3& s4
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virtio-win
Version: 6.5
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Gal Hammer
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 902153 (view as bug list)
Depends On:
Blocks: 572483
TreeView+ depends on / blocked
 
Reported: 2013-01-21 02:57 UTC by dawu
Modified: 2013-12-06 07:15 UTC (History)
9 users (show)

Fixed In Version: virtio-win-prewhql-0.1-53
Doc Type: Bug Fix
Doc Text:
Cause: Virtio-serial doesn't work after resuming from S3/S4. Consequence: after resuming from S3/S4 vioserial device does not operate properly. Fix: Changes in device remove and device D0 state enter and exit logic. Result: With the fixes mentioned above, vioserial device can operate properly after resuming from S3/S4 state.
Clone Of:
Environment:
Last Closed: 2013-11-22 00:00:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1729 0 normal SHIPPED_LIVE virtio-win bug fix and enhancement update 2013-11-21 00:39:25 UTC

Description dawu 2013-01-21 02:57:02 UTC
Description of problem:
Guest failure in adding port  for device  virtio-serial  after resume from F4 during transferring data from guest to host

Version-Release number of selected component (if applicable):
kernel-2.6.32-351.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.351.el6.x86_64
virtio-win-prewhql-0.1-51

How reproducible:
100%

Steps to Reproduce:
1.Start guest with CLI:
   /usr/libexec/qemu-kvm -M rhel6.4.0 -m 2G -smp 2 -usb -device usb-tablet,id=tablet0 -drive file=win7-32.qcow2,if=none,id=drive-virtio0-0-0,format=qcow2,werror=stop,rerror=stop,cache=none -device ide-drive,drive=drive-virtio0-0-0,id=virti0-0-0,bootindex=1 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device rtl8139,netdev=hostnet0,id=net0,mac=00:12:10:94:a3:f8 -uuid 8677bf9b-3cf6-47a1-b3e9-94213b801c87  -monitor stdio -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=0 -vga std -device virtio-serial-pci,id=virtio-serial0,max_ports=16 -chardev socket,id=channel0,path=/tmp/helloworld,server,nowait -device virtserialport,chardev=channel0,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port0  -vnc :1

2.Transerring data from guest to host
eg: in the host : #python serial-host-receive.py /tmp/helloworld
    in the guest: #for ((;;))
                   do 
                   python  VirtIOChannel_guest_send.py com.redhat.rhevm.vdsm;
                   done      
3.Doing hibernate in the guest
4.Resuming guest by start guest CLI again.

Actual results:
Guest can resuming with error from qemu side and serial function fails to work.
  (qemu) qemu-kvm: virtio-serial-bus: Guest failure in adding port 1 for device virtio-serial0.0

Expected results: 
Guest should resume without any error,and serial function works well.

Additional info:
when reboot guest, all can work well.

Comment 2 Gal Hammer 2013-01-21 07:30:15 UTC
Adding comment as a reminder: I'm not sure but I think a simpler scenario of device_del and device_add from qemu's monitor also reproduce this problem.

Comment 3 dawu 2013-01-21 07:38:53 UTC
*** Bug 902153 has been marked as a duplicate of this bug. ***

Comment 4 Mike Cao 2013-01-21 07:41:55 UTC
I think the key point of this bug is that " virtio-serial driver does not work after S3& s4"

Comment 5 Gal Hammer 2013-01-21 08:24:02 UTC
(In reply to comment #4)
> I think the key point of this bug is that " virtio-serial driver does not
> work after S3& s4"

Like I wrote in c#2, I think that the problem is that the driver doesn't tell qemu the it re-created the device. So it doesn't related only to s3/s4, but to hot-plugging.

Comment 6 Mike Cao 2013-01-21 08:49:39 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > I think the key point of this bug is that " virtio-serial driver does not
> > work after S3& s4"
> 
> Like I wrote in c#2, I think that the problem is that the driver doesn't
> tell qemu the it re-created the device. So it doesn't related only to s3/s4,
> but to hot-plugging.

I tried serialport hotplug/unplug ,can not trigger this issue
So thsi bug is related to s3/s4.

Comment 7 Gal Hammer 2013-01-21 20:25:37 UTC
(In reply to comment #6)

> I tried serialport hotplug/unplug ,can not trigger this issue
> So thsi bug is related to s3/s4.

You were right. It was not related to hot plug. I probably mixed the previous bug with the index mismatch error with this one.

A patch was posted.

Comment 9 langfang 2013-03-20 03:52:21 UTC
Test the fixed  version ,Not  hit the error info 
 
(qemu) qemu-kvm: virtio-serial-bus: Guest failure in adding port 1 for device virtio-serial0.0

But after S4 ,serial device can not work. Need to disable then enable serial driver for work.

HOst:
# uname -r
2.6.32-358.el6.x86_64
# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.358.el6.x86_64

Guest :win2008-32

virtio-win-prewhql-0.1-55

steps:
1.Boot guest with serial device
Check serial device.
Transfer data from guest to host and host to guest work OK

2.Do s4 in guest
Choose "Hibernate"

3.Boot guest with same CLI

4.Transfer data from guest to host 

Results:

The serial device can not transfer data anymore ,need to disable then enable serial driver.



CLI:
/usr/libexec/qemu-kvm -name win2008 -M rhel6.4.0 -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -uuid 6c547c60-1651-decf-cf03-edcb14a3642b -nodefconfig -nodefaults -monitor stdio -rtc base=localtime,driftfix=slew -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/home/win2008-32.raw,if=none,id=drive-ide0-0-0,format=raw,cache=none -device virtio-blk-pci,scsi=off,drive=drive-ide0-0-0,id=ide0-0-0,addr=0x3,bootindex=1 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -device usb-tablet,id=input0 -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 -netdev tap,id=hostnet0,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,mac=00:10:20:2d:31:21,bus=pci.0,addr=0x6,id=net0 -device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=0x7 -chardev socket,id=channel0,path=/tmp/serial-socket-1,server,nowait -device virtserialport,chardev=channel0,name=org.linux-kvm.port.1,bus=virtio-serial0.0,id=port1,nr=1 -chardev socket,id=channel1,path=/tmp/serial-socket-2,server,nowait -device virtserialport,chardev=channel1,name=org.linux-kvm.port.2,bus=virtio-serial0.0,id=port2 -device virtio-serial-pci,id=virtio-serial1,max_ports=16,bus=pci.0,addr=0x8 -chardev socket,id=channel2,path=/tmp/serial-socket-3,server,nowait -device virtserialport,chardev=channel2,name=org.linux-kvm.port.3,bus=virtio-serial1.0,id=port3,nr=1 -chardev null,id=channel3,path=/tmp/serial-socket-4,server,nowait -device virtserialport,chardev=channel3,name=org.linux-kvm.port.4,bus=virtio-serial1.0,id=port4 -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -spice port=5830,disable-ticketing -vga qxl

Addtional info :do S3 hit same problem

Comment 10 Mike Cao 2013-03-20 07:01:40 UTC
According to comment #9 ,this issue does not fixed yet 
Re-assigned this issue

Comment 11 Gal Hammer 2013-04-03 05:18:32 UTC
My fault. I've fixed the original problem (qemu's complain about a "Guest failure in adding port...") and forgot to check that the port is also usable too.

A patch was posted.

Comment 13 dawu 2013-04-19 03:18:20 UTC
Verified this issue on the latest build virtio-win-prewhql-59 with the same steps in the comment #0:

CLI:
/usr/libexec/qemu-kvm -M rhel6.4.0 -m 2G -smp 2 -usb -device usb-tablet,id=tablet0 -drive file=win7-32.qcow2,if=none,id=drive-virtio0-0-0,format=qcow2,werror=stop,rerror=stop,cache=none -device ide-drive,drive=drive-virtio0-0-0,id=virti0-0-0,bootindex=1 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device e1000,netdev=hostnet0,id=net0,mac=00:12:10:94:a3:f8 -uuid 8677bf9b-3cf6-47a1-b3e9-94213b801c87  -monitor stdio -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=0 -vga cirrus -device virtio-serial-pci,id=virtio-serial0,max_ports=16 -chardev socket,id=channel0,path=/tmp/helloworld,server,nowait -device virtserialport,chardev=channel0,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port0  -vnc :1

Actual Results:
Guest can resume from S4/S3 without any issue.

Based on above this issue has been fixed.

Thanks!
Best Regards,
Dawn

Comment 14 Mike Cao 2013-04-19 05:08:49 UTC
Based on comment #13 ,move status to VERIFIED.

Comment 22 errata-xmlrpc 2013-11-22 00:00:49 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-1729.html


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