From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50368) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOofy-000358-IT for qemu-devel@nongnu.org; Wed, 25 Sep 2013 08:58:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VOoft-0000A5-SH for qemu-devel@nongnu.org; Wed, 25 Sep 2013 08:58:42 -0400 Sender: fluxion From: Michael Roth Date: Wed, 25 Sep 2013 07:57:37 -0500 Message-Id: <1380113886-16845-10-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1380113886-16845-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1380113886-16845-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 09/38] pseries: Fix stalls on hypervisor virtual console List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org From: Anton Blanchard 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 Signed-off-by: Alexander Graf (cherry picked from commit 7770b6f78a2d655e03852a5de238f5926c92be6a) Signed-off-by: Michael Roth --- hw/char/spapr_vty.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/char/spapr_vty.c b/hw/char/spapr_vty.c index a799721..9c2aef8 100644 --- a/hw/char/spapr_vty.c +++ b/hw/char/spapr_vty.c @@ -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; } -- 1.7.9.5