From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [KVM PATCH v3 2/2] kvm: add support for irqfd via eventfd-notification interface Date: Sun, 3 May 2009 21:31:11 +0100 Message-ID: <20090503203111.GB8633@ZenIV.linux.org.uk> References: <20090427182540.6646.96740.stgit@dev.haskins.net> <20090427183334.6646.90800.stgit@dev.haskins.net> <20090503064432.GS8633@ZenIV.linux.org.uk> <20090503190136.GY8633@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Gregory Haskins , kvm@vger.kernel.org, Linux Kernel Mailing List , avi@redhat.com To: Davide Libenzi Return-path: Received: from zeniv.linux.org.uk ([195.92.253.2]:34787 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756716AbZECUbO (ORCPT ); Sun, 3 May 2009 16:31:14 -0400 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Sun, May 03, 2009 at 01:11:39PM -0700, Davide Libenzi wrote: > On Sun, 3 May 2009, Al Viro wrote: > > > IOW, the sane solution would be to export something that returns your > > struct file *. And stop playing with fd completely. > > This builds but it's not tested at all. > > - Make all the work of the old anon_inode_getfd(), done by a new > anon_inode_getfile(), with anon_inode_getfd() using its services > > - Make all the work done by sys_eventfd(), done by a new > eventfd_file_create() (which in turn uses anon_inode_getfile()), with > sys_eventfd() using its services > > IRQfd can use eventfd_file_create(), fget(), get_unused_fd_flags() and > fd_install() just before returning. > Is that what you had in mind? More or less, but I'd like to see the irqfd side of that...