dcavalca / rpms / qemu

Forked from rpms/qemu 11 months ago
Clone

Blame 0009-pseries-Fix-stalls-on-hypervisor-virtual-console.patch

298366
From 3fe494efc5eb107c4c90e96df3e6131f9960f4b9 Mon Sep 17 00:00:00 2001
298366
From: Anton Blanchard <anton@samba.org>
298366
Date: Tue, 13 Aug 2013 14:10:04 +1000
298366
Subject: [PATCH] pseries: Fix stalls on hypervisor virtual console
298366
298366
A number of users are reporting stalls when using the pseries
298366
hypervisor virtual console.
298366
298366
A simple test case is to paste 15 or 17 characters at a time
298366
into the console. Pasting 15 characters at a time works fine
298366
but pasting 17 characters hangs for a random amount of time.
298366
Other activity (network, qemu monitor etc) unblocks it.
298366
298366
If qemu-char tries to send more than 16 characters at once,
298366
vty_can_receive returns false. At this point we have to
298366
wait for the guest to consume that output. Everything is good
298366
so far.
298366
298366
The problem occurs when the the guest does consume the output.
298366
We need to signal back to the qemu-char layer that we are
298366
ready for more input. Without this we block until something
298366
else kicks us (eg network activity).
298366
298366
Signed-off-by: Anton Blanchard <anton@samba.org>
298366
Signed-off-by: Alexander Graf <agraf@suse.de>
298366
(cherry picked from commit 7770b6f78a2d655e03852a5de238f5926c92be6a)
298366
298366
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
298366
---
298366
 hw/char/spapr_vty.c | 2 ++
298366
 1 file changed, 2 insertions(+)
298366
298366
diff --git a/hw/char/spapr_vty.c b/hw/char/spapr_vty.c
298366
index a799721..9c2aef8 100644
298366
--- a/hw/char/spapr_vty.c
298366
+++ b/hw/char/spapr_vty.c
298366
@@ -47,6 +47,8 @@ static int vty_getchars(VIOsPAPRDevice *sdev, uint8_t *buf, int max)
298366
         buf[n++] = dev->buf[dev->out++ % VTERM_BUFSIZE];
298366
     }
298366
 
298366
+    qemu_chr_accept_input(dev->chardev);
298366
+
298366
     return n;
298366
 }
298366