qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thiemo Seufer <ths@networkno.de>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] upgrading emulated UART to 16550A
Date: Tue, 5 Aug 2008 15:57:38 +0200	[thread overview]
Message-ID: <20080805135738.GC4102@networkno.de> (raw)
In-Reply-To: <48985284.9060001@eu.citrix.com>

Stefano Stabellini wrote:
> This patch upgrades the emulated UART to 16550A, the code comes from
> xen-unstable.
> The main improvement was introduced with the following patch and
> subsequent email thread:
> 
> http://lists.xensource.com/archives/html/xen-devel/2007-12/msg00129.html
> 
> I only made few changes to use qemu_get_clock instead of
> clock_gettime, as Anthony suggested a little while ago.
> 
> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> 
> ---
> 
> 
> diff --git a/hw/serial.c b/hw/serial.c
> index ffd6ac9..f63e62a 100644
> --- a/hw/serial.c
> +++ b/hw/serial.c
> @@ -1,5 +1,5 @@
>  /*
> - * QEMU 16450 UART emulation
> + * QEMU 16550A UART emulation
>   *
>   * Copyright (c) 2003-2004 Fabrice Bellard

I think it needs also an updated copyright notice.

[snip]
> +/* Rate limit serial requests so that e.g. grub on a serial console
> +   doesn't kill dom0.  Simple token bucket.  If we get some actual
> +   data from the user, instantly refil the bucket. */
> +
> +/* How long it takes to generate a token, in nanoseconds. */
> +#define TOKEN_PERIOD 1000000
> +/* Maximum and initial size of token bucket */
> +#define TOKENS_MAX 100000

This token business probably needs a bit more explanation, at a glance
I didn't figure out what it is meant to do (and why the constants above
are good).


Thiemo

  reply	other threads:[~2008-08-05 13:57 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-05 13:15 [Qemu-devel] [PATCH] upgrading emulated UART to 16550A Stefano Stabellini
2008-08-05 13:57 ` Thiemo Seufer [this message]
2008-08-05 14:17   ` Stefano Stabellini
2008-08-05 15:02 ` Jason Wessel
2008-08-05 15:15   ` Stefano Stabellini
2008-08-06  2:28 ` Anthony Liguori
  -- strict thread matches above, loose matches on Subject: below --
2008-08-07 17:35 Stefano Stabellini
2008-08-07 18:58 ` Anthony Liguori
2008-08-07 21:02   ` Samuel Thibault
2008-08-07 21:13     ` Anthony Liguori
2008-08-07 21:39       ` Samuel Thibault
2008-08-08 14:36   ` Stefano Stabellini
2008-08-07 19:26 ` Jason Wessel
2008-08-08 14:55 Stefano Stabellini
2008-08-08 15:15 ` Stefano Stabellini
2008-08-08 16:58 Stefano Stabellini
2008-08-09 18:26 ` Anthony Liguori
2008-08-09 18:44   ` Samuel Thibault
2008-08-11 14:17 ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080805135738.GC4102@networkno.de \
    --to=ths@networkno.de \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefano.stabellini@eu.citrix.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).