]> git.proxmox.com Git - qemu.git/commit - hw/char/virtio-serial-bus.c
virtio-serial-bus: let chardev know the exact number of bytes requested
authorAmit Shah <amit.shah@redhat.com>
Mon, 24 Sep 2012 18:35:16 +0000 (00:05 +0530)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 28 Sep 2012 10:16:27 +0000 (12:16 +0200)
commitad3005ad8c70a69705149d3ce6d1e51fb76edb15
tree2db5b511c56f2e04ae2aa73adb6717d4ce1817d8
parent0d8d7690850eb0cf2b2b60933cf47669a6b6f18f
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@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio-serial-bus.c