Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Alex Williamson
On Mon, 2012-06-18 at 17:33 +0300, Avi Kivity wrote: > On 06/18/2012 05:27 PM, Alex Williamson wrote: > > On Mon, 2012-06-18 at 13:14 +0300, Avi Kivity wrote: > >> On 06/18/2012 01:11 PM, Michael S. Tsirkin wrote: > >> > >> >> (vhost, > >> >> msi-less ivshmem clone)? > >> > > >> > I guess vhost c

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Avi Kivity
On 06/18/2012 05:18 PM, Alex Williamson wrote: >> >> I don't understand how this works. A level IRQ isn't de-asserted by the >> EOI, it's de-asserted by its source. >> >> Consider the following sequence: >> >> deviceguest >> >> event >>assert >> interrupt >>

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Avi Kivity
On 06/18/2012 05:27 PM, Alex Williamson wrote: > On Mon, 2012-06-18 at 13:14 +0300, Avi Kivity wrote: >> On 06/18/2012 01:11 PM, Michael S. Tsirkin wrote: >> >> >> (vhost, >> >> msi-less ivshmem clone)? >> > >> > I guess vhost can poll eventfd and reinject an interrupt. >> > Of course to bypass q

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Alex Williamson
On Mon, 2012-06-18 at 14:17 +0300, Michael S. Tsirkin wrote: > On Mon, Jun 18, 2012 at 02:03:40PM +0300, Avi Kivity wrote: > > On 06/18/2012 01:55 PM, Michael S. Tsirkin wrote: > > > On Mon, Jun 18, 2012 at 01:14:13PM +0300, Avi Kivity wrote: > > >> On 06/18/2012 01:11 PM, Michael S. Tsirkin wrote:

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Alex Williamson
On Mon, 2012-06-18 at 13:14 +0300, Avi Kivity wrote: > On 06/18/2012 01:11 PM, Michael S. Tsirkin wrote: > > >> (vhost, > >> msi-less ivshmem clone)? > > > > I guess vhost can poll eventfd and reinject an interrupt. > > Of course to bypass qemu completely we also need to support reads over > > io

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Alex Williamson
On Mon, 2012-06-18 at 13:11 +0300, Michael S. Tsirkin wrote: > On Mon, Jun 18, 2012 at 12:33:01PM +0300, Avi Kivity wrote: > > On 06/18/2012 11:52 AM, Jan Kiszka wrote: > > >> > > >> I don't understand how this works. A level IRQ isn't de-asserted by the > > >> EOI, it's de-asserted by its source

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Alex Williamson
On Mon, 2012-06-18 at 11:02 +0300, Avi Kivity wrote: > On 06/16/2012 07:34 PM, Alex Williamson wrote: > > I'm looking for opinions on this approach. For vfio device assignment > > we minimally need a way to get EOIs from the in-kernel irqchip out to > > userspace. Getting that out via an eventfd

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Alex Williamson
On Mon, 2012-06-18 at 08:51 +0300, Michael S. Tsirkin wrote: > On Sun, Jun 17, 2012 at 03:38:57PM -0600, Alex Williamson wrote: > > On Sun, 2012-06-17 at 21:44 +0300, Michael S. Tsirkin wrote: > > > On Sat, Jun 16, 2012 at 10:34:39AM -0600, Alex Williamson wrote: > > > > I'm looking for opinions on

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Alex Williamson
On Mon, 2012-06-18 at 09:00 +0300, Michael S. Tsirkin wrote: > On Sun, Jun 17, 2012 at 04:15:44PM -0600, Alex Williamson wrote: > > On Sun, Jun 17, 2012 at 3:38 PM, Alex Williamson > > wrote: > > > On Sun, 2012-06-17 at 21:44 +0300, Michael S. Tsirkin wrote: > > >> On Sat, Jun 16, 2012 at 10:34:39

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Michael S. Tsirkin
On Mon, Jun 18, 2012 at 02:03:40PM +0300, Avi Kivity wrote: > On 06/18/2012 01:55 PM, Michael S. Tsirkin wrote: > > On Mon, Jun 18, 2012 at 01:14:13PM +0300, Avi Kivity wrote: > >> On 06/18/2012 01:11 PM, Michael S. Tsirkin wrote: > >> > >> >> (vhost, > >> >> msi-less ivshmem clone)? > >> > > >>

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Avi Kivity
On 06/18/2012 01:55 PM, Michael S. Tsirkin wrote: > On Mon, Jun 18, 2012 at 01:14:13PM +0300, Avi Kivity wrote: >> On 06/18/2012 01:11 PM, Michael S. Tsirkin wrote: >> >> >> (vhost, >> >> msi-less ivshmem clone)? >> > >> > I guess vhost can poll eventfd and reinject an interrupt. >> > Of course t

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Michael S. Tsirkin
On Mon, Jun 18, 2012 at 01:14:13PM +0300, Avi Kivity wrote: > On 06/18/2012 01:11 PM, Michael S. Tsirkin wrote: > > >> (vhost, > >> msi-less ivshmem clone)? > > > > I guess vhost can poll eventfd and reinject an interrupt. > > Of course to bypass qemu completely we also need to support reads over

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Avi Kivity
On 06/18/2012 01:11 PM, Michael S. Tsirkin wrote: >> (vhost, >> msi-less ivshmem clone)? > > I guess vhost can poll eventfd and reinject an interrupt. > Of course to bypass qemu completely we also need to support reads over > ioeventfd somehow. > eventfd is not suitable for level triggered inte

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Michael S. Tsirkin
On Mon, Jun 18, 2012 at 12:33:01PM +0300, Avi Kivity wrote: > On 06/18/2012 11:52 AM, Jan Kiszka wrote: > >> > >> I don't understand how this works. A level IRQ isn't de-asserted by the > >> EOI, it's de-asserted by its source. > >> > >> Consider the following sequence: > >> > >> device

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Avi Kivity
On 06/18/2012 11:52 AM, Jan Kiszka wrote: >> >> I don't understand how this works. A level IRQ isn't de-asserted by the >> EOI, it's de-asserted by its source. >> >> Consider the following sequence: >> >> deviceguest >> >> event >>assert >> interrupt >>

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Jan Kiszka
On 2012-06-18 10:02, Avi Kivity wrote: > On 06/16/2012 07:34 PM, Alex Williamson wrote: >> I'm looking for opinions on this approach. For vfio device assignment >> we minimally need a way to get EOIs from the in-kernel irqchip out to >> userspace. Getting that out via an eventfd would allow us to

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-18 Thread Avi Kivity
On 06/16/2012 07:34 PM, Alex Williamson wrote: > I'm looking for opinions on this approach. For vfio device assignment > we minimally need a way to get EOIs from the in-kernel irqchip out to > userspace. Getting that out via an eventfd would allow us to bounce > all level interrupts out to usersp

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-17 Thread Michael S. Tsirkin
On Sun, Jun 17, 2012 at 04:15:44PM -0600, Alex Williamson wrote: > On Sun, Jun 17, 2012 at 3:38 PM, Alex Williamson > wrote: > > On Sun, 2012-06-17 at 21:44 +0300, Michael S. Tsirkin wrote: > >> On Sat, Jun 16, 2012 at 10:34:39AM -0600, Alex Williamson wrote: > >> > I'm looking for opinions on thi

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-17 Thread Michael S. Tsirkin
On Sun, Jun 17, 2012 at 03:38:57PM -0600, Alex Williamson wrote: > On Sun, 2012-06-17 at 21:44 +0300, Michael S. Tsirkin wrote: > > On Sat, Jun 16, 2012 at 10:34:39AM -0600, Alex Williamson wrote: > > > I'm looking for opinions on this approach. For vfio device assignment > > > we minimally need a

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-17 Thread Alex Williamson
On Sun, Jun 17, 2012 at 3:38 PM, Alex Williamson wrote: > On Sun, 2012-06-17 at 21:44 +0300, Michael S. Tsirkin wrote: >> On Sat, Jun 16, 2012 at 10:34:39AM -0600, Alex Williamson wrote: >> > I'm looking for opinions on this approach.  For vfio device assignment >> > we minimally need a way to get

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-17 Thread Alex Williamson
On Sun, 2012-06-17 at 21:44 +0300, Michael S. Tsirkin wrote: > On Sat, Jun 16, 2012 at 10:34:39AM -0600, Alex Williamson wrote: > > I'm looking for opinions on this approach. For vfio device assignment > > we minimally need a way to get EOIs from the in-kernel irqchip out to > > userspace. Gettin

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-17 Thread Michael S. Tsirkin
On Sat, Jun 16, 2012 at 10:34:39AM -0600, Alex Williamson wrote: > I'm looking for opinions on this approach. For vfio device assignment > we minimally need a way to get EOIs from the in-kernel irqchip out to > userspace. Getting that out via an eventfd would allow us to bounce > all level interr

Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-17 Thread Jan Kiszka
On 2012-06-16 18:34, Alex Williamson wrote: > I'm looking for opinions on this approach. For vfio device assignment > we minimally need a way to get EOIs from the in-kernel irqchip out to > userspace. Getting that out via an eventfd would allow us to bounce > all level interrupts out to userspace

[RFC PATCH] kvm: Extend irqfd to support level interrupts

2012-06-16 Thread Alex Williamson
I'm looking for opinions on this approach. For vfio device assignment we minimally need a way to get EOIs from the in-kernel irqchip out to userspace. Getting that out via an eventfd would allow us to bounce all level interrupts out to userspace, where we would de-assert the device interrupt in q