qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] high resolution timer question


From: Anthony Liguori
Subject: Re: [Qemu-devel] high resolution timer question
Date: Mon, 10 Dec 2007 12:01:34 -0600
User-agent: Thunderbird 2.0.0.6 (X11/20071022)

Blue Swirl wrote:
On 12/10/07, Robert Reif <address@hidden> 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.








reply via email to

[Prev in Thread] Current Thread [Next in Thread]