From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xz5AP-0005wp-Bl for qemu-devel@nongnu.org; Thu, 11 Dec 2014 09:56:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xz5AJ-0007Xq-7l for qemu-devel@nongnu.org; Thu, 11 Dec 2014 09:56:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58120) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xz5AI-0007Xe-Vj for qemu-devel@nongnu.org; Thu, 11 Dec 2014 09:56:27 -0500 Message-ID: <5489B090.4090500@redhat.com> Date: Thu, 11 Dec 2014 15:56:16 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] Serial: possible hang during intensive interaction over the console List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kirill Batuzov , Andrey Korolyov Cc: Peter Crosthwaite , "qemu-devel@nongnu.org" , Markus Armbruster On 09/09/2014 17:28, Kirill Batuzov wrote: > In short: QEMU serial port transmits data as fast as it can ignoring > baud rate completely. As a result we are stuck in serial8250_interrupt > ISR in kernel most of the time. > > Overall we have a large issue with rate control and flow control for > virtual serial port implementations. In QEMU we have over dozen different > UARTs for different platforms. Among them only one uses baud rate > (strongarm) and only one implements flow control (16550A). > > CC'ing some people to discuss general course of action in regards to > serial implementation. > > We probably want some abstract "serial" which is able to transmit one > character with fixed baud rate and maximum retry count. The actual > serial port implementations should implement interrupts, control > registers and FIFO around it. With such design we will not need to > implement the same bits of rate control and retry logic for every UART > in QEMU. > > Any thoughts on this? The baud rate used to be there in the 8250 emulation. It was removed when flow control was added (why?), in commit fcfb4d6a. Adding it back would be nice. I think an abstraction of the "serial port" concept that is based on the 16550A register set, and with arbitrarily sized FIFOs, would be nice to have. All device models would talk to such abstraction. The 16550A is well known and a lot of devices take inspiration from it). Paolo