diff mbox

pseries: Fix stalls on hypervisor virtual console

Message ID 20130813141004.381edc25@kryten
State New
Headers show

Commit Message

Anton Blanchard Aug. 13, 2013, 4:10 a.m. UTC
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).

Cc: qemu-stable@nongnu.org
Signed-off-by: Anton Blanchard <anton@samba.org>
---

Comments

Alexander Graf Aug. 14, 2013, 9:59 a.m. UTC | #1
On 13.08.2013, at 06:10, Anton Blanchard wrote:

> 
> 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).
> 
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Anton Blanchard <anton@samba.org>

Thanks, applied to ppc-next. Let's get this into 1.6 through stable, as 1.6.0 is basically out.


Alex
diff mbox

Patch

Index: b/hw/char/spapr_vty.c
===================================================================
--- a/hw/char/spapr_vty.c
+++ b/hw/char/spapr_vty.c
@@ -47,6 +47,8 @@  static int vty_getchars(VIOsPAPRDevice *
         buf[n++] = dev->buf[dev->out++ % VTERM_BUFSIZE];
     }
 
+    qemu_chr_accept_input(dev->chardev);
+
     return n;
 }