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

2009-02-11 Thread Marcelo Tosatti
On Mon, Feb 02, 2009 at 04:23:40PM +0200, Avi Kivity wrote: > Gleb Natapov wrote: >> On Mon, Feb 02, 2009 at 04:04:55PM +0200, Avi Kivity wrote: >> >>> Gleb Natapov wrote: >>> > Right, I was thinking about > > if (irq >= 0 && irq < IOAPIC_NUM_PINS) { > > Should return

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

2009-02-02 Thread Avi Kivity
Gleb Natapov wrote: On Mon, Feb 02, 2009 at 04:04:55PM +0200, Avi Kivity wrote: Gleb Natapov wrote: 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? Shou

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

2009-02-02 Thread Gleb Natapov
On Mon, Feb 02, 2009 at 04:04:55PM +0200, Avi Kivity wrote: > Gleb Natapov wrote: >>> 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 i

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

2009-02-02 Thread Avi Kivity
Gleb Natapov wrote: 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? Yes, the number ultimately comes from userspace. -- erro

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

2009-01-28 Thread Marcelo Tosatti
On Wed, Jan 28, 2009 at 06:37:36PM +0200, Gleb Natapov wrote: > 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 >

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

2009-01-28 Thread Gleb Natapov
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 interrup

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

2009-01-27 Thread Marcelo Tosatti
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 expres

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

2009-01-27 Thread Gleb Natapov
On Mon, Jan 26, 2009 at 02:10:38PM -0200, Marcelo Tosatti wrote: > Hi Gleb, > > On Wed, Jan 21, 2009 at 02:34:28PM +0200, Gleb Natapov wrote: > > Use this one instead. Adds capabilities checks. > > > > Signed-off-by: Gleb Natapov > > > index 179dcb0..2752016 100644 > > --- a/arch/x86/kvm/i8259.

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

2009-01-26 Thread Marcelo Tosatti
Hi Gleb, On Wed, Jan 21, 2009 at 02:34:28PM +0200, Gleb Natapov wrote: > Use this one instead. Adds capabilities checks. > > Signed-off-by: Gleb Natapov > index 179dcb0..2752016 100644 > --- a/arch/x86/kvm/i8259.c > +++ b/arch/x86/kvm/i8259.c > @@ -76,12 +76,13 @@ void kvm_pic_clear_isr_ack(str

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

2009-01-21 Thread Gleb Natapov
Use this one instead. Adds capabilities checks. Signed-off-by: Gleb Natapov diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c index dbf527a..d83d3ff 100644 --- a/arch/ia64/kvm/kvm-ia64.c +++ b/arch/ia64/kvm/kvm-ia64.c @@ -182,7 +182,7 @@ int kvm_dev_ioctl_check_extension(long ext)

[PATCH v2] report IRQ injection status to userspace.

2009-01-21 Thread Gleb Natapov
Signed-off-by: Gleb Natapov diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c index dbf527a..21c8445 100644 --- a/arch/ia64/kvm/kvm-ia64.c +++ b/arch/ia64/kvm/kvm-ia64.c @@ -925,6 +925,7 @@ long kvm_arch_vm_ioctl(struct file *filp, goto out; }