Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-09-05 Thread Avi Kivity
On 09/05/2012 06:28 PM, Michael S. Tsirkin wrote: >> gsi 3 is configured as edge in the ioapic. It has (unusually) two >> inputs: one driven by userspace, the other by irqfd. >> >> cpu 0cpu 1 >> - >> irqfd: set to 1 >> ioapic:

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-09-05 Thread Michael S. Tsirkin
On Wed, Sep 05, 2012 at 06:22:57PM +0300, Avi Kivity wrote: > On 09/05/2012 06:13 PM, Michael S. Tsirkin wrote: > > On Wed, Sep 05, 2012 at 05:59:46PM +0300, Avi Kivity wrote: > >> On 09/05/2012 05:51 PM, Michael S. Tsirkin wrote: > >> > On Wed, Sep 05, 2012 at 05:35:43PM +0300, Avi Kivity wrote: >

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-09-05 Thread Avi Kivity
On 09/05/2012 06:13 PM, Michael S. Tsirkin wrote: > On Wed, Sep 05, 2012 at 05:59:46PM +0300, Avi Kivity wrote: >> On 09/05/2012 05:51 PM, Michael S. Tsirkin wrote: >> > On Wed, Sep 05, 2012 at 05:35:43PM +0300, Avi Kivity wrote: >> >> On 08/22/2012 03:41 AM, Michael S. Tsirkin wrote: >> >> >> >>

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-09-05 Thread Avi Kivity
On 09/05/2012 06:07 PM, Michael S. Tsirkin wrote: > On Wed, Sep 05, 2012 at 05:46:17PM +0300, Avi Kivity wrote: >> On 08/21/2012 10:29 PM, Alex Williamson wrote: >> > KVM_IRQFD currently uses the reserved KVM_USERSPACE_IRQ_SOURCE_ID >> > which is also shared with userspace injection methods like >>

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-09-05 Thread Michael S. Tsirkin
On Wed, Sep 05, 2012 at 06:12:04PM +0300, Avi Kivity wrote: > On 09/05/2012 06:09 PM, Michael S. Tsirkin wrote: > > On Wed, Sep 05, 2012 at 05:51:53PM +0300, Michael S. Tsirkin wrote: > >> On Wed, Sep 05, 2012 at 05:35:43PM +0300, Avi Kivity wrote: > >> > On 08/22/2012 03:41 AM, Michael S. Tsirkin

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-09-05 Thread Michael S. Tsirkin
On Wed, Sep 05, 2012 at 05:59:46PM +0300, Avi Kivity wrote: > On 09/05/2012 05:51 PM, Michael S. Tsirkin wrote: > > On Wed, Sep 05, 2012 at 05:35:43PM +0300, Avi Kivity wrote: > >> On 08/22/2012 03:41 AM, Michael S. Tsirkin wrote: > >> >> > >> >> I assumed you were pointing out the level vs edge i

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-09-05 Thread Avi Kivity
On 09/05/2012 06:09 PM, Michael S. Tsirkin wrote: > On Wed, Sep 05, 2012 at 05:51:53PM +0300, Michael S. Tsirkin wrote: >> On Wed, Sep 05, 2012 at 05:35:43PM +0300, Avi Kivity wrote: >> > On 08/22/2012 03:41 AM, Michael S. Tsirkin wrote: >> > >> >> > >> I assumed you were pointing out the level vs

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-09-05 Thread Michael S. Tsirkin
On Wed, Sep 05, 2012 at 05:51:53PM +0300, Michael S. Tsirkin wrote: > On Wed, Sep 05, 2012 at 05:35:43PM +0300, Avi Kivity wrote: > > On 08/22/2012 03:41 AM, Michael S. Tsirkin wrote: > > >> > > >> I assumed you were pointing out the level vs edge interaction. If we > > >> call that a userspace b

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-09-05 Thread Michael S. Tsirkin
On Wed, Sep 05, 2012 at 05:46:17PM +0300, Avi Kivity wrote: > On 08/21/2012 10:29 PM, Alex Williamson wrote: > > KVM_IRQFD currently uses the reserved KVM_USERSPACE_IRQ_SOURCE_ID > > which is also shared with userspace injection methods like > > KVM_IRQ_LINE. This can cause a conflict if an irqfd

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-09-05 Thread Avi Kivity
On 09/05/2012 05:51 PM, Michael S. Tsirkin wrote: > On Wed, Sep 05, 2012 at 05:35:43PM +0300, Avi Kivity wrote: >> On 08/22/2012 03:41 AM, Michael S. Tsirkin wrote: >> >> >> >> I assumed you were pointing out the level vs edge interaction. If we >> >> call that a userspace bug, I can just drop th

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-09-05 Thread Michael S. Tsirkin
On Wed, Sep 05, 2012 at 05:35:43PM +0300, Avi Kivity wrote: > On 08/22/2012 03:41 AM, Michael S. Tsirkin wrote: > >> > >> I assumed you were pointing out the level vs edge interaction. If we > >> call that a userspace bug, I can just drop this. Thanks, > >> > >> Alex > > > > level is userspace

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-09-05 Thread Avi Kivity
On 08/21/2012 10:29 PM, Alex Williamson wrote: > KVM_IRQFD currently uses the reserved KVM_USERSPACE_IRQ_SOURCE_ID > which is also shared with userspace injection methods like > KVM_IRQ_LINE. This can cause a conflict if an irqfd triggers on > a GSI asserted through KVM_IRQ_LINE. Move irqfd to it

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-09-05 Thread Avi Kivity
On 08/22/2012 03:41 AM, Michael S. Tsirkin wrote: >> >> I assumed you were pointing out the level vs edge interaction. If we >> call that a userspace bug, I can just drop this. Thanks, >> >> Alex > > level is userspace bug I think :) I don't see how it's a bug. Suppose we have a vfio device

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-08-21 Thread Alex Williamson
On Wed, 2012-08-22 at 03:41 +0300, Michael S. Tsirkin wrote: > On Tue, Aug 21, 2012 at 03:14:54PM -0600, Alex Williamson wrote: > > On Tue, 2012-08-21 at 23:41 +0300, Michael S. Tsirkin wrote: > > > On Tue, Aug 21, 2012 at 02:06:19PM -0600, Alex Williamson wrote: > > > > On Tue, 2012-08-21 at 22:58

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-08-21 Thread Michael S. Tsirkin
On Tue, Aug 21, 2012 at 03:14:54PM -0600, Alex Williamson wrote: > On Tue, 2012-08-21 at 23:41 +0300, Michael S. Tsirkin wrote: > > On Tue, Aug 21, 2012 at 02:06:19PM -0600, Alex Williamson wrote: > > > On Tue, 2012-08-21 at 22:58 +0300, Michael S. Tsirkin wrote: > > > > On Tue, Aug 21, 2012 at 01:

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-08-21 Thread Alex Williamson
On Tue, 2012-08-21 at 23:41 +0300, Michael S. Tsirkin wrote: > On Tue, Aug 21, 2012 at 02:06:19PM -0600, Alex Williamson wrote: > > On Tue, 2012-08-21 at 22:58 +0300, Michael S. Tsirkin wrote: > > > On Tue, Aug 21, 2012 at 01:29:06PM -0600, Alex Williamson wrote: > > > > KVM_IRQFD currently uses th

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-08-21 Thread Michael S. Tsirkin
On Tue, Aug 21, 2012 at 02:06:19PM -0600, Alex Williamson wrote: > On Tue, 2012-08-21 at 22:58 +0300, Michael S. Tsirkin wrote: > > On Tue, Aug 21, 2012 at 01:29:06PM -0600, Alex Williamson wrote: > > > KVM_IRQFD currently uses the reserved KVM_USERSPACE_IRQ_SOURCE_ID > > > which is also shared wit

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-08-21 Thread Alex Williamson
On Tue, 2012-08-21 at 22:58 +0300, Michael S. Tsirkin wrote: > On Tue, Aug 21, 2012 at 01:29:06PM -0600, Alex Williamson wrote: > > KVM_IRQFD currently uses the reserved KVM_USERSPACE_IRQ_SOURCE_ID > > which is also shared with userspace injection methods like > > KVM_IRQ_LINE. This can cause a co

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-08-21 Thread Michael S. Tsirkin
On Tue, Aug 21, 2012 at 01:29:06PM -0600, Alex Williamson wrote: > KVM_IRQFD currently uses the reserved KVM_USERSPACE_IRQ_SOURCE_ID > which is also shared with userspace injection methods like > KVM_IRQ_LINE. This can cause a conflict if an irqfd triggers on > a GSI asserted through KVM_IRQ_LINE.