From: Gleb Natapov <gleb@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Avi Kivity <avi@redhat.com>, kvm@vger.kernel.org
Subject: Re: [PATCH v2] report IRQ injection status to userspace.
Date: Wed, 28 Jan 2009 18:37:36 +0200 [thread overview]
Message-ID: <20090128163735.GI15778@redhat.com> (raw)
In-Reply-To: <20090127154107.GC5806@amt.cnet>
On Tue, Jan 27, 2009 at 01:41:07PM -0200, Marcelo Tosatti wrote:
> On Tue, Jan 27, 2009 at 03:27:39PM +0200, Gleb Natapov wrote:
> > > -1 here ?
> > >
> > I think 1 is better here. For level=0 we always want to report that interrupt
> > was injected and for the case of edge triggered interrupt and level=1
> > ioapic_service() will always be called. BTW it seems that expression
> > old_irr != ioapic->irr in:
> > if ((!entry.fields.trig_mode && old_irr != ioapic->irr)
> > || !entry.fields.remote_irr)
> > ret = ioapic_service(ioapic, irq);
> > Will always be true since for edge triggered interrupt irr is always
> > cleared by ioapic_service(). Am I right?
>
> Right, I was thinking about
>
> if (irq >= 0 && irq < IOAPIC_NUM_PINS) {
>
> Should return MASKED if irq is outside the acceptable range?
>
Is this ever can be false? Should we BUG() if irq is out of range?
> > > + }
> > > + }
> > > #endif
> > >
> > > Is that what you intended ?
> > >
> > Yes! If interrupt was lost due to making it should not be reinjected.
>
> That assumes guests won't mask the interrupt temporarily in the irqchip,
> hope that is OK (as Avi noted earlier guests use CPU to mask irqs
> temporarily, most of the time).
And if a guest masks interrupts it can't complain that some are lost. I
haven't seen Windows masking RTC irq.
--
Gleb.
next prev parent reply other threads:[~2009-01-28 16:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-21 11:32 [PATCH v2] report IRQ injection status to userspace Gleb Natapov
2009-01-21 12:34 ` Gleb Natapov
2009-01-26 16:10 ` Marcelo Tosatti
2009-01-27 13:27 ` Gleb Natapov
2009-01-27 15:41 ` Marcelo Tosatti
2009-01-28 16:37 ` Gleb Natapov [this message]
2009-01-28 19:09 ` Marcelo Tosatti
2009-02-02 14:04 ` Avi Kivity
2009-02-02 14:03 ` Gleb Natapov
2009-02-02 14:23 ` Avi Kivity
2009-02-11 20:45 ` Marcelo Tosatti
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=20090128163735.GI15778@redhat.com \
--to=gleb@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.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