From mboxrd@z Thu Jan 1 00:00:00 1970 From: Randy Dunlap Subject: Re: [PATCH V2] VFIO driver: Non-privileged user level PCI drivers Date: Tue, 8 Jun 2010 14:45:34 -0700 Message-ID: <20100608144534.bb228916.randy.dunlap@oracle.com> References: <4c0eb470.1HMjondO00NIvFM6%pugs@cisco.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, chrisw@sous-sol.org, joro@8bytes.org, hjk@linutronix.de, mst@redhat.com, avi@redhat.com, gregkh@suse.de, aafabbri@cisco.com, scofeldm@cisco.com To: "Tom Lyon" Return-path: In-Reply-To: <4c0eb470.1HMjondO00NIvFM6%pugs@cisco.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Tue, 08 Jun 2010 14:21:52 -0700 Tom Lyon wrote: > diff -uprN linux-2.6.34/Documentation/vfio.txt vfio-linux-2.6.34/Documentation/vfio.txt > --- linux-2.6.34/Documentation/vfio.txt 1969-12-31 16:00:00.000000000 -0800 > +++ vfio-linux-2.6.34/Documentation/vfio.txt 2010-06-07 15:05:42.000000000 -0700 > @@ -0,0 +1,177 @@ ... > +Interrupts: > + > +Device interrupts are translated by the vfio driver into input events on event > +notification file descriptors created by the eventfd system call. The user > +program must create one or more event descriptors and pass them to the vfio > +driver via ioctls to arrange for the interrupt mapping: > +1. > + efd = eventfd(0, 0); > + ioctl(vfio_fd, VFIO_EVENTFD_IRQ, &efd); > + This provides an eventfd for traditional IRQ interrupts. > + IRQs will be disable after each interrupt until the driver disabled > + re-enables them via the PCI COMMAND register. > +2. > + efd = eventfd(0, 0); > + ioctl(vfio_fd, VFIO_EVENTFD_MSI, &efd); > + This connects MSI interrupts to an eventfd. > +3. > + int arg[N+1]; > + arg[0] = N; > + arg[1..N] = eventfd(0, 0); > + ioctl(vfio_fd, VFIO_EVENTFDS_MSIX, arg); > + This connects N MSI-X interrupts with N eventfds. --- ~Randy *** Remember to use Documentation/SubmitChecklist when testing your code ***