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

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

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

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

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

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

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-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 that shares

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's

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 bug I think :)

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 this. Thanks,

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 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 bug, I can just

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 edge

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 interaction. If

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 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 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: I assumed you

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: On

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: recognize

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

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

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

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

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

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

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 the

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:29:06PM

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 +0300,

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.

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 conflict

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 with