From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ri6cX-0006GV-3E for qemu-devel@nongnu.org; Tue, 03 Jan 2012 10:49:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ri6cW-0000y0-6X for qemu-devel@nongnu.org; Tue, 03 Jan 2012 10:49:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58716) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ri6cV-0000xs-QO for qemu-devel@nongnu.org; Tue, 03 Jan 2012 10:49:48 -0500 Date: Tue, 3 Jan 2012 21:19:31 +0530 From: Amit Shah Message-ID: <20120103154931.GB4536@amit.redhat.com> References: <4EE9EBB9.9020300@de.ibm.com> <4EFC616F.4060806@de.ibm.com> <20111229140407.GC4576@amit.redhat.com> <4EFC7657.5090804@de.ibm.com> <20111229142658.GD4576@amit.redhat.com> <4EFC79EE.6020000@de.ibm.com> <20111229151434.GF4576@amit.redhat.com> <4F01D045.1060108@de.ibm.com> <1DE12B28-6524-43A1-896D-5F17137BEA5C@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1DE12B28-6524-43A1-896D-5F17137BEA5C@suse.de> Subject: Re: [Qemu-devel] [PATCHv2] Fix virtio-console failure on unconnected pty List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Christian Borntraeger , "qemu-devel@nongnu.org" On (Mon) 02 Jan 2012 [17:55:06], Alexander Graf wrote: > > On 02.01.2012, at 16:41, Christian Borntraeger wrote: > > > On 02/01/12 16:34, Alexander Graf wrote: > >>>> if (ret == -EAGAIN || (ret >= 0 && ret < buf_size)) { > >>>> virtio_serial_throttle_port(port, true); > >>> > >>> Ah; I see what's happening. pty_chr_write() returns 0 if a client > >>> isn't yet connected. > >>> > >>> This is different from the buggy tcp_chr_write() code, which just > >>> returns 'len', i.e. a successful write. And since I've only tested > >>> with tcp/unix sockets, I couldn't see why throttling could get > >>> enabled. > >> > >> So what's the conclusion then? :) > > > > My conclusion is that with my patch virtio-console on a pty works, without > > it doesnt. :-) > > I think Amit said that he is going to apply the patch. > > Ah, alright then :) Yep, patches go through some tests first before sending out the pull request. Amit