Re: [PATCH] report IRQ injection status to userspace.

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

 



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.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux