public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org, dor.laor@qumranet.com
Cc: kvm-devel <kvm-devel@lists.sourceforge.net>
Subject: Re: [Qemu-devel] [PATCH] [RFC] Fix time drift of rtc clock + general support
Date: Sun, 23 Mar 2008 23:29:09 +0000	[thread overview]
Message-ID: <200803232329.10474.paul@codesourcery.com> (raw)
In-Reply-To: <1206312059.30051.9.camel@localhost.localdomain>

On Sunday 23 March 2008, Dor Laor wrote:
> On Sun, 2008-03-23 at 16:19 +0000, Paul Brook wrote:
> > On Sunday 23 March 2008, Dor Laor wrote:
> > > --- a/qemu/hw/irq.c
> > > +++ b/qemu/hw/irq.c
> > > @@ -30,6 +30,8 @@ struct IRQState {
> > >      int n;
> > >  };
> > >
> > > +uint32_t qemu_irq_acked[NR_IRQ_WORDS];
> >
> > This is absolute rubbish. The whole point of the IRQ framework is that it
> > doesn't assume a single flat IRQ controller.
>
> Thanks for the compliments & the review ...
> I specifically said that I'll move this variable into per-cpu var.

Per-cpu is no better.

> Moreover, the translation between irq line to vector is handled by the
> 'qemu_get_irq_vector' that calls 'irq_controller_get_vector' should take
> care of the translation.
> It works for ioapic, I'm not sure if it works for the flat pic case yet.

Which shows you've completely missed the point.  irq->n is not a globally 
unique identifier. It's a local per-controller index. qemu has targets with 
multiple nested interrupt controllers, anything trying to maintain global or 
per-cpu IRQ lists is fundamentally broken.

> Anyway you're welcome to drift without the patch or provide constructive
> comments.

Well, the patch doesn't even build on non-x86 targets.

> > a new timer will be fired to try inject it again soon (==0.1msec)

If the guest is missing interrupts, the chances of a 0.1ms interval working 
are not great.  Most likely It's either going trigger immediately, or be 
delayed significantly and you're going to end up even further behind. 

If triggering immediately is OK then why not do that all the time?
If triggering immediately is not acceptable then you're still going to loose 
interrupts.

Paul

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

  reply	other threads:[~2008-03-23 23:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-23 14:27 [PATCH] [RFC] Fix time drift of rtc clock + general support Dor Laor
2008-03-23 16:19 ` [Qemu-devel] " Paul Brook
2008-03-23 22:40   ` Dor Laor
2008-03-23 23:29     ` Paul Brook [this message]
2008-03-24  7:15       ` Avi Kivity
2008-03-24  7:47         ` Avi Kivity
2008-03-24  7:11   ` Avi Kivity
2008-03-24 13:45     ` Paul Brook
2008-03-24 13:56       ` Avi Kivity

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=200803232329.10474.paul@codesourcery.com \
    --to=paul@codesourcery.com \
    --cc=dor.laor@qumranet.com \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=qemu-devel@nongnu.org \
    /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