Revision ed8e5a85 hw/virtio-serial-bus.c

b/hw/virtio-serial-bus.c
163 163
                abort();
164 164
            }
165 165
            if (ret == -EAGAIN || (ret >= 0 && ret < buf_size)) {
166
                virtio_serial_throttle_port(port, true);
166
		/*
167
                 * this is a temporary check until chardevs can signal to
168
                 * frontends that they are writable again. This prevents
169
                 * the console from going into throttled mode (forever)
170
                 * if virtio-console is connected to a pty without a
171
                 * listener. Otherwise the guest spins forever.
172
                 * We can revert this if
173
                 * 1: chardevs can notify frondends
174
                 * 2: the guest driver does not spin in these cases
175
                 */
176
                if (!info->is_console) {
177
                    virtio_serial_throttle_port(port, true);
178
                }
167 179
                port->iov_idx = i;
168 180
                if (ret > 0) {
169 181
                    port->iov_offset += ret;

Also available in: Unified diff