From: Gleb Natapov <gleb@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm@vger.kernel.org, Avi Kivity <avi@redhat.com>
Subject: Re: [PATCH] report IRQ injection status to userspace.
Date: Tue, 20 Jan 2009 19:15:58 +0200 [thread overview]
Message-ID: <20090120171558.GB8319@redhat.com> (raw)
In-Reply-To: <20090120165340.GA28270@amt.cnet>
On Tue, Jan 20, 2009 at 02:53:40PM -0200, Marcelo Tosatti wrote:
> Gleb,
>
> Don't you want IRQ ack notification instead to control reinjection?
>
I don't see the easy way to do it. There are couple of ways to do what I
need with IRQ ack notifications:
1) expose them to userspace. Each IRQ ack will generate VM exit.
2) make kernel to alway track particular IRQs (userspace will need to
tell kernel which ones it wants to be tracked) and return status
using this info instead of the way my patch does it.
3) Like above but re-inject interrupt from inside the kernel instead of
reporting delivery status to userspace.
First one will generate more VM exist -> not good. The third one has
problem with RTC frequency changes. So the only sane option is second
one, but why us it if we can know if interrupt injection failed during
injection itself?
> Because I think you'll always see a successful injection if using PIC.
>
Then my patch has a bug. I'll recheck. It works for APIC.
> On Tue, Jan 20, 2009 at 03:46:53PM +0200, Gleb Natapov wrote:
>
> > diff --git a/include/linux/kvm.h b/include/linux/kvm.h
> > index 869462c..b2c6b93 100644
> > --- a/include/linux/kvm.h
> > +++ b/include/linux/kvm.h
> > @@ -48,7 +48,10 @@ struct kvm_irq_level {
> > * For IA-64 (APIC model) IOAPIC0: irq 0-23; IOAPIC1: irq 24-47..
> > * For X86 (standard AT mode) PIC0/1: irq 0-15. IOAPIC0: 0-23..
> > */
> > - __u32 irq;
> > + union {
> > + __u32 irq;
> > + __s32 status;
> > + };
> > __u32 level;
> > };
>
> And won't this break older userspace?
This should not since sizeof should remain the same. But my patch also
changes ioctl definition and it will break old userspace for sure. To
maintain backward compatibility I'll need to introduce new ioctl.
--
Gleb.
next prev parent reply other threads:[~2009-01-20 17:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-20 13:46 [PATCH] report IRQ injection status to userspace Gleb Natapov
2009-01-20 16:53 ` Marcelo Tosatti
2009-01-20 17:15 ` Gleb Natapov [this message]
2009-01-21 10:03 ` Gleb Natapov
-- strict thread matches above, loose matches on Subject: below --
2009-02-04 11:36 [PATCH] Report " Gleb Natapov
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=20090120171558.GB8319@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