]> git.proxmox.com Git - qemu.git/commitdiff
pseries: Fix stalls on hypervisor virtual console
authorAnton Blanchard <anton@samba.org>
Tue, 13 Aug 2013 04:10:04 +0000 (14:10 +1000)
committerAlexander Graf <agraf@suse.de>
Mon, 2 Sep 2013 08:06:41 +0000 (10:06 +0200)
A number of users are reporting stalls when using the pseries
hypervisor virtual console.

A simple test case is to paste 15 or 17 characters at a time
into the console. Pasting 15 characters at a time works fine
but pasting 17 characters hangs for a random amount of time.
Other activity (network, qemu monitor etc) unblocks it.

If qemu-char tries to send more than 16 characters at once,
vty_can_receive returns false. At this point we have to
wait for the guest to consume that output. Everything is good
so far.

The problem occurs when the the guest does consume the output.
We need to signal back to the qemu-char layer that we are
ready for more input. Without this we block until something
else kicks us (eg network activity).

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
hw/char/spapr_vty.c

index a7997213b6334b349b6edb179202b810334688ec..9c2aef82e61a92bbd27ef60991b48c27bcd43e55 100644 (file)
@@ -47,6 +47,8 @@ static int vty_getchars(VIOsPAPRDevice *sdev, uint8_t *buf, int max)
         buf[n++] = dev->buf[dev->out++ % VTERM_BUFSIZE];
     }
 
+    qemu_chr_accept_input(dev->chardev);
+
     return n;
 }