From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v3 1/1] Shared memory uio_pci driver Date: Thu, 01 Apr 2010 11:59:19 +0300 Message-ID: <4BB46067.9040209@redhat.com> References: <1269497376-21903-1-git-send-email-cam@cs.ualberta.ca> <4BAB30EE.4020509@redhat.com> <8286e4ee1003250924q7cca5e71u8b8b7c6d8b785eb8@mail.gmail.com> <4BAB90BB.5030401@redhat.com> <8286e4ee1003260914u5e6ceee2pf0c00590de182fb6@mail.gmail.com> <4BAE44F2.20801@redhat.com> <8286e4ee1003281248k204a5bd4tc48e6ccc755918b@mail.gmail.com> <4BB114AC.9040902@redhat.com> <8286e4ee1003300752n41a5afdbta0b23fc0cb75b99d@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, "Michael S. Tsirkin" To: Cam Macdonell Return-path: In-Reply-To: <8286e4ee1003300752n41a5afdbta0b23fc0cb75b99d@mail.gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org List-Id: kvm.vger.kernel.org On 03/30/2010 05:52 PM, Cam Macdonell wrote: > >> Ah, the usual "ioctls are ugly, go away". >> >> It could be done via sysfs: >> >> $ cat /sys/.../msix/max-interrupts >> 256 >> $ echo 4> /sys/.../msix/allocate >> $ # subdirectories 0 1 2 3 magically appear >> $ # bind fd 13 to msix >> $ echo 13> /sys/.../msix/2/bind-fd >> $ # from now on, msix interrupt 2 will call eventfd_signal() on fd 13 >> >> Call me old fashioned, but I prefer ioctls. >> > Good point. iiuc, the goal relative to ioctls in UIO was to not have > device drivers creating their own device-specific ABIs and drivers > that are just massive switch statements. Having ioctls that support > functions for UIO in general, such as pairing msi vectors to eventfds, > does not go against that goal. > Device specific ioctls are clearly a bad idea for uio. -- error compiling committee.c: too many arguments to function