qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH v3 1/1] Shared memory uio_pci driver


From: Avi Kivity
Subject: [Qemu-devel] Re: [PATCH v3 1/1] Shared memory uio_pci driver
Date: Thu, 01 Apr 2010 11:59:19 +0300
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc12 Thunderbird/3.0.3

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]