Bug 1004232

Summary: virtio-serial-bus: let chardev know the exact number of bytes requested
Product: Red Hat Enterprise Linux 6 Reporter: Amos Kong <akong>
Component: qemu-kvmAssignee: Amos Kong <akong>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.4CC: acathrow, ailan, akong, amit.shah, bsarathy, chayang, juzhang, mdeng, michen, mkenneth, qzhang, 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: 2013-09-26 06:19:33 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:

Description Amos Kong 2013-09-04 09:04:53 UTC
backport the following commit to qemu-kvm-rhel6

commit ad3005ad8c70a69705149d3ce6d1e51fb76edb15
Author: Amit Shah <amit.shah>
Date:   Tue Sep 25 00:05:16 2012 +0530

    virtio-serial-bus: let chardev know the exact number of bytes requested
    
    Using the virtqueue_avail_bytes() function had an unnecessarily
    crippling effect on the number of bytes needed by the guest as reported
    to the chardev layer in the can_read() callback.
    
    Using the new virtqueue_get_avail_bytes() function will let us advertise
    the exact number of bytes we can send to the guest.
    
    Signed-off-by: Amit Shah <amit.shah>
    Signed-off-by: Michael S. Tsirkin <mst>

Comment 2 Amos Kong 2013-09-26 06:19:33 UTC
It seems we just check if the return value larger than 0 or not, we don't care about the detail number. So we don't need to backport it.