From patchwork Fri Jul 29 14:41:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: redcap97 X-Patchwork-Id: 9252569 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B510B601C0 for ; Fri, 29 Jul 2016 14:52:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A6536281AA for ; Fri, 29 Jul 2016 14:52:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9AF9528326; Fri, 29 Jul 2016 14:52:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1177F281AA for ; Fri, 29 Jul 2016 14:52:30 +0000 (UTC) Received: from localhost ([::1]:59971 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bT99J-0000FL-Ac for patchwork-qemu-devel@patchwork.kernel.org; Fri, 29 Jul 2016 10:52:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41556) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bT97o-0007yj-Cr for qemu-devel@nongnu.org; Fri, 29 Jul 2016 10:50:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bT97k-0000hF-5j for qemu-devel@nongnu.org; Fri, 29 Jul 2016 10:50:55 -0400 Received: from indium.canonical.com ([91.189.90.7]:45146) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bT97j-0000gy-Vh for qemu-devel@nongnu.org; Fri, 29 Jul 2016 10:50:52 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.76 #1 (Debian)) id 1bT97h-0001zJ-Lm for ; Fri, 29 Jul 2016 14:50:49 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 006642E80EB for ; Fri, 29 Jul 2016 14:50:48 +0000 (UTC) MIME-Version: 1.0 Date: Fri, 29 Jul 2016 14:41:49 -0000 From: redcap97 To: qemu-devel@nongnu.org X-Launchpad-Notification-Type: bug X-Launchpad-Bug: product=qemu; status=Incomplete; importance=Undecided; assignee=berrange@redhat.com; X-Launchpad-Bug-Information-Type: Public X-Launchpad-Bug-Private: no X-Launchpad-Bug-Security-Vulnerability: no X-Launchpad-Bug-Commenters: berrange redcap97 X-Launchpad-Bug-Reporter: redcap97 (redcap97) X-Launchpad-Bug-Modifier: redcap97 (redcap97) References: <20160529110018.18315.70473.malonedeb@soybean.canonical.com> Message-Id: <20160729144149.22388.30756.malone@soybean.canonical.com> X-Launchpad-Message-Rationale: Subscriber (QEMU) @qemu-devel-ml X-Launchpad-Message-For: qemu-devel-ml Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="18169"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 9e78dd6504683dd411fad4a75c48f729f74da36b X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 91.189.90.7 Subject: [Qemu-devel] [Bug 1586756] Re: "-serial unix:" option of qemu-system-* is broken in qemu 2.6.0 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Bug 1586756 <1586756@bugs.launchpad.net> Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Sorry, this issue only occur in qemu-system-arm (vexpress-a9). In hw/char/pl011.c, qemu_chr_fe_write function is called directly and EAGAIN isn't handled. http://git.qemu.org/?p=qemu.git;a=blob;f=hw/char/pl011.c;h=210c87b4c2bd000d80c359ca5c05d43c64210677;hb=bfc766d38e1fae5767d43845c15c79ac8fa6d6af#l148 So I use following a patch. ---- ---- qemu_chr_fe_write_all function handles EAGAIN. diff --git a/hw/char/pl011.c b/hw/char/pl011.c index c0fbf8a..6e29db8 100644 --- a/hw/char/pl011.c +++ b/hw/char/pl011.c @@ -146,7 +146,7 @@ static void pl011_write(void *opaque, hwaddr offset, /* ??? Check if transmitter is enabled. */ ch = value; if (s->chr) - qemu_chr_fe_write(s->chr, &ch, 1); + qemu_chr_fe_write_all(s->chr, &ch, 1); s->int_level |= PL011_INT_TX; pl011_update(s); break;