diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2012-01-06 08:15:39 -0600 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-01-06 08:15:39 -0600 |
commit | f40b7d113d73d5ca1cdcbe6a4acc1be340a3751d (patch) | |
tree | 325d6084d471222fb96ef1404dfca421d790c7d3 | |
parent | 74b728e4f3a4be43c71a58e4c8102b6d700a0018 (diff) | |
parent | ed8e5a85a1741147ce06932b478a509ce3407061 (diff) | |
download | qemu-f40b7d113d73d5ca1cdcbe6a4acc1be340a3751d.tar.gz qemu-f40b7d113d73d5ca1cdcbe6a4acc1be340a3751d.tar.bz2 qemu-f40b7d113d73d5ca1cdcbe6a4acc1be340a3751d.zip |
Merge remote-tracking branch 'amit/master' into staging
* amit/master:
virtio-console: Fix failure on unconnected pty
-rw-r--r-- | hw/virtio-serial-bus.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c index fe0233f6f1..3a9004a9b8 100644 --- a/hw/virtio-serial-bus.c +++ b/hw/virtio-serial-bus.c @@ -163,7 +163,19 @@ static void do_flush_queued_data(VirtIOSerialPort *port, VirtQueue *vq, abort(); } if (ret == -EAGAIN || (ret >= 0 && ret < buf_size)) { - virtio_serial_throttle_port(port, true); + /* + * this is a temporary check until chardevs can signal to + * frontends that they are writable again. This prevents + * the console from going into throttled mode (forever) + * if virtio-console is connected to a pty without a + * listener. Otherwise the guest spins forever. + * We can revert this if + * 1: chardevs can notify frondends + * 2: the guest driver does not spin in these cases + */ + if (!info->is_console) { + virtio_serial_throttle_port(port, true); + } port->iov_idx = i; if (ret > 0) { port->iov_offset += ret; |