From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49720) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V95vw-0004V1-MJ for qemu-devel@nongnu.org; Tue, 13 Aug 2013 00:10:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V95vr-0000rT-TE for qemu-devel@nongnu.org; Tue, 13 Aug 2013 00:10:12 -0400 Received: from ozlabs.org ([2402:b800:7003:1:1::1]:38823) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V95vr-0000nD-Gu for qemu-devel@nongnu.org; Tue, 13 Aug 2013 00:10:07 -0400 Date: Tue, 13 Aug 2013 14:10:04 +1000 From: Anton Blanchard Message-ID: <20130813141004.381edc25@kryten> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] pseries: Fix stalls on hypervisor virtual console List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson , Alexander Graf , qemu-ppc@nongnu.org, qemu-devel@nongnu.org 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 --- 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; }