From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J1mwn-00034g-5I for qemu-devel@nongnu.org; Mon, 10 Dec 2007 13:01:41 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J1mwm-00033K-Dx for qemu-devel@nongnu.org; Mon, 10 Dec 2007 13:01:40 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J1mwm-000335-7Z for qemu-devel@nongnu.org; Mon, 10 Dec 2007 13:01:40 -0500 Received: from rv-out-0910.google.com ([209.85.198.186]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J1mwk-0007ls-Ud for qemu-devel@nongnu.org; Mon, 10 Dec 2007 13:01:39 -0500 Received: by rv-out-0910.google.com with SMTP id g11so6168607rvb for ; Mon, 10 Dec 2007 10:01:37 -0800 (PST) Message-ID: <475D7EFE.7060309@codemonkey.ws> Date: Mon, 10 Dec 2007 12:01:34 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] high resolution timer question References: <475D3839.8040207@earthlink.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Blue Swirl wrote: > On 12/10/07, Robert Reif wrote: > >> Writing data to a serial port on the sparc emulation happens immediately. >> I would like to throttle the write speed to match the actual baud rate. >> What's the best way to do this in qemu? Will QEMUTimer work for a >> 1 millisecond timer? >> > > Do you mean that you want the serial port to match the host speed so > that for example, at 9600 baud, target would only receive 9600 bits > per second? Or do you mean that the emulated CPU should see bits > arriving at the same rate that the real CPU would see compared to CPU > execution speed? > > On the positive side, this would fix a bug with serial interrupts > arriving too fast which can trigger Linux panics. But this would also > complicate the design because currently the devices do not need to > emulate any internal buffers. > > I think the throttling should be done at CharDriver level so that all > targets and also other devices, like parallel ports (SUNW,bpp anyone?) > But the timing is entirely a concept of the hardware devices. It seems like it would be easier to just add a growable buffer, and then setup a timer in each device that reads from the buffer. Regards, Anthony Liguori > can benefit. It should be turned off when talking to real hardware on > the host. > > > >