Re: [KVM PATCH v5 3/4] KVM: Fix races in irqfd using new eventfd_kref_get interface

2009-06-28 Thread Gregory Haskins
Michael S. Tsirkin wrote: > On Sun, Jun 28, 2009 at 03:54:42PM -0400, Gregory Haskins wrote: > >> Michael S. Tsirkin wrote: >> >>> On Sun, Jun 28, 2009 at 12:28:19PM -0400, Gregory Haskins wrote: >>> >>> Michael S. Tsirkin wrote: > On Sun, Jun 28,

Re: [KVM PATCH v5 3/4] KVM: Fix races in irqfd using new eventfd_kref_get interface

2009-06-28 Thread Michael S. Tsirkin
On Sun, Jun 28, 2009 at 03:54:42PM -0400, Gregory Haskins wrote: > Michael S. Tsirkin wrote: > > On Sun, Jun 28, 2009 at 12:28:19PM -0400, Gregory Haskins wrote: > > > >> Michael S. Tsirkin wrote: > >> > >>> On Sun, Jun 28, 2009 at 03:57:30PM +0300, Michael S. Tsirkin wrote: > >>> > >>>

Re: [KVM PATCH v5 3/4] KVM: Fix races in irqfd using new eventfd_kref_get interface

2009-06-28 Thread Gregory Haskins
Michael S. Tsirkin wrote: > On Sun, Jun 28, 2009 at 12:28:19PM -0400, Gregory Haskins wrote: > >> Michael S. Tsirkin wrote: >> >>> On Sun, Jun 28, 2009 at 03:57:30PM +0300, Michael S. Tsirkin wrote: >>> >>> On Sun, Jun 28, 2009 at 03:56:12PM +0300, Michael S. Tsirkin wrote: >

Re: [KVM PATCH v5 3/4] KVM: Fix races in irqfd using new eventfd_kref_get interface

2009-06-28 Thread Michael S. Tsirkin
On Sun, Jun 28, 2009 at 12:28:19PM -0400, Gregory Haskins wrote: > Michael S. Tsirkin wrote: > > On Sun, Jun 28, 2009 at 03:57:30PM +0300, Michael S. Tsirkin wrote: > > > >> On Sun, Jun 28, 2009 at 03:56:12PM +0300, Michael S. Tsirkin wrote: > >> > >>> On Sun, Jun 28, 2009 at 08:53:22AM -04

Re: [KVM PATCH v5 3/4] KVM: Fix races in irqfd using new eventfd_kref_get interface

2009-06-28 Thread Gregory Haskins
Michael S. Tsirkin wrote: > On Sun, Jun 28, 2009 at 03:57:30PM +0300, Michael S. Tsirkin wrote: > >> On Sun, Jun 28, 2009 at 03:56:12PM +0300, Michael S. Tsirkin wrote: >> >>> On Sun, Jun 28, 2009 at 08:53:22AM -0400, Gregory Haskins wrote: >>> Michael S. Tsirkin wrote:

Re: [KVM PATCH v5 3/4] KVM: Fix races in irqfd using new eventfd_kref_get interface

2009-06-28 Thread Gregory Haskins
Michael S. Tsirkin wrote: > On Sun, Jun 28, 2009 at 08:53:22AM -0400, Gregory Haskins wrote: > >> Michael S. Tsirkin wrote: >> >>> On Thu, Jun 25, 2009 at 09:28:27AM -0400, Gregory Haskins wrote: >>> >>> eventfd currently emits a POLLHUP wakeup on f_ops->release() to generate

Re: [KVM PATCH v5 3/4] KVM: Fix races in irqfd using new eventfd_kref_get interface

2009-06-28 Thread Avi Kivity
On 06/28/2009 04:18 PM, Michael S. Tsirkin wrote: that could be the case, as we have, for example: static struct file_operations kvm_vm_fops = { .release= kvm_vm_release, .unlocked_ioctl = kvm_vm_ioctl, .compat_ioctl = kvm_vm_ioctl, .mmap

Re: [KVM PATCH v5 3/4] KVM: Fix races in irqfd using new eventfd_kref_get interface

2009-06-28 Thread Michael S. Tsirkin
On Sun, Jun 28, 2009 at 03:57:30PM +0300, Michael S. Tsirkin wrote: > On Sun, Jun 28, 2009 at 03:56:12PM +0300, Michael S. Tsirkin wrote: > > On Sun, Jun 28, 2009 at 08:53:22AM -0400, Gregory Haskins wrote: > > > Michael S. Tsirkin wrote: > > > > On Thu, Jun 25, 2009 at 09:28:27AM -0400, Gregory Ha

Re: [KVM PATCH v5 3/4] KVM: Fix races in irqfd using new eventfd_kref_get interface

2009-06-28 Thread Michael S. Tsirkin
On Sun, Jun 28, 2009 at 08:50:28AM -0400, Gregory Haskins wrote: > Michael S. Tsirkin wrote: > > On Thu, Jun 25, 2009 at 09:28:27AM -0400, Gregory Haskins wrote: > > > >> @@ -65,25 +134,39 @@ irqfd_wakeup(wait_queue_t *wait, unsigned mode, int > >> sync, void *key) > >>unsigned long flags =

Re: [KVM PATCH v5 3/4] KVM: Fix races in irqfd using new eventfd_kref_get interface

2009-06-28 Thread Michael S. Tsirkin
On Sun, Jun 28, 2009 at 03:56:12PM +0300, Michael S. Tsirkin wrote: > On Sun, Jun 28, 2009 at 08:53:22AM -0400, Gregory Haskins wrote: > > Michael S. Tsirkin wrote: > > > On Thu, Jun 25, 2009 at 09:28:27AM -0400, Gregory Haskins wrote: > > > > > >> eventfd currently emits a POLLHUP wakeup on f_o

Re: [KVM PATCH v5 3/4] KVM: Fix races in irqfd using new eventfd_kref_get interface

2009-06-28 Thread Michael S. Tsirkin
On Sun, Jun 28, 2009 at 08:53:22AM -0400, Gregory Haskins wrote: > Michael S. Tsirkin wrote: > > On Thu, Jun 25, 2009 at 09:28:27AM -0400, Gregory Haskins wrote: > > > >> eventfd currently emits a POLLHUP wakeup on f_ops->release() to generate a > >> "release" callback. This lets eventfd client

Re: [KVM PATCH v5 3/4] KVM: Fix races in irqfd using new eventfd_kref_get interface

2009-06-28 Thread Gregory Haskins
Michael S. Tsirkin wrote: > On Thu, Jun 25, 2009 at 09:28:27AM -0400, Gregory Haskins wrote: > >> eventfd currently emits a POLLHUP wakeup on f_ops->release() to generate a >> "release" callback. This lets eventfd clients know if the eventfd is about >> to go away and is very useful particularl

Re: [KVM PATCH v5 3/4] KVM: Fix races in irqfd using new eventfd_kref_get interface

2009-06-28 Thread Gregory Haskins
Michael S. Tsirkin wrote: > On Thu, Jun 25, 2009 at 09:28:27AM -0400, Gregory Haskins wrote: > >> @@ -65,25 +134,39 @@ irqfd_wakeup(wait_queue_t *wait, unsigned mode, int >> sync, void *key) >> unsigned long flags = (unsigned long)key; >> >> /* >> - * Assume we will be called wi

Re: [KVM PATCH v5 3/4] KVM: Fix races in irqfd using new eventfd_kref_get interface

2009-06-28 Thread Michael S. Tsirkin
On Thu, Jun 25, 2009 at 09:28:27AM -0400, Gregory Haskins wrote: > eventfd currently emits a POLLHUP wakeup on f_ops->release() to generate a > "release" callback. This lets eventfd clients know if the eventfd is about > to go away and is very useful particularly for in-kernel clients. However, >

Re: [KVM PATCH v5 3/4] KVM: Fix races in irqfd using new eventfd_kref_get interface

2009-06-28 Thread Michael S. Tsirkin
On Thu, Jun 25, 2009 at 09:28:27AM -0400, Gregory Haskins wrote: > @@ -65,25 +134,39 @@ irqfd_wakeup(wait_queue_t *wait, unsigned mode, int > sync, void *key) > unsigned long flags = (unsigned long)key; > > /* > - * Assume we will be called with interrupts disabled > + * Ca

Re: [KVM PATCH v5 3/4] KVM: Fix races in irqfd using new eventfd_kref_get interface

2009-06-26 Thread Gregory Haskins
Gregory Haskins wrote: > eventfd currently emits a POLLHUP wakeup on f_ops->release() to generate a > "release" callback. This lets eventfd clients know if the eventfd is about > to go away and is very useful particularly for in-kernel clients. However, > until recently it is not possible to use

[KVM PATCH v5 3/4] KVM: Fix races in irqfd using new eventfd_kref_get interface

2009-06-25 Thread Gregory Haskins
eventfd currently emits a POLLHUP wakeup on f_ops->release() to generate a "release" callback. This lets eventfd clients know if the eventfd is about to go away and is very useful particularly for in-kernel clients. However, until recently it is not possible to use this feature of eventfd in a ra