[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC] virtio-console fails on unconnected pty
From: |
Christian Borntraeger |
Subject: |
[Qemu-devel] [RFC] virtio-console fails on unconnected pty |
Date: |
Thu, 15 Dec 2011 13:44:41 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110921 Lightning/1.0b2 Thunderbird/3.1.15 |
Amit,
when I tried qemu with -virtio-console pty the guest hangs and attaching on
/dev/pts/<x> does
not return anything if the attachement is too late.
Turns out that the console is already throttled and the guest is heavily
spinning but get_buf
never returns the buffer. There seems to be no way for the console to
unthrottle the port.
For the virtio-serial use case we dont want to loose data but for the console
we better drop
data instead of "killing" the guest console. The old serial console also drops
data after a
retry, so what about dropping data righ away if no listener is connected to the
pty?
This experimental patch seems to help. Makes sense?
Signed-off-by: Christian Borntraeger <address@hidden>
--- a/hw/virtio-serial-bus.c
+++ b/hw/virtio-serial-bus.c
@@ -163,7 +163,9 @@ 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);
+ if (!info->is_console) {
+ virtio_serial_throttle_port(port, true);
+ }
port->iov_idx = i;
if (ret > 0) {
port->iov_offset += ret;
- [Qemu-devel] [RFC] virtio-console fails on unconnected pty,
Christian Borntraeger <=
- Re: [Qemu-devel] [RFC] virtio-console fails on unconnected pty, Amit Shah, 2011/12/16
- [Qemu-devel] [PATCHv2] Fix virtio-console failure on unconnected pty, Christian Borntraeger, 2011/12/29
- Re: [Qemu-devel] [PATCHv2] Fix virtio-console failure on unconnected pty, Amit Shah, 2011/12/29
- Re: [Qemu-devel] [PATCHv2] Fix virtio-console failure on unconnected pty, Amit Shah, 2011/12/29
- Re: [Qemu-devel] [PATCHv2] Fix virtio-console failure on unconnected pty, Christian Borntraeger, 2011/12/29
- Re: [Qemu-devel] [PATCHv2] Fix virtio-console failure on unconnected pty, Christian Borntraeger, 2011/12/29
- Re: [Qemu-devel] [PATCHv2] Fix virtio-console failure on unconnected pty, Amit Shah, 2011/12/29
- Re: [Qemu-devel] [PATCHv2] Fix virtio-console failure on unconnected pty, Christian Borntraeger, 2011/12/29
- Re: [Qemu-devel] [PATCHv2] Fix virtio-console failure on unconnected pty, Amit Shah, 2011/12/29