Re: [PATCH V3] drivers/uio/uio_pci_generic.c: allow access for non-privileged processes

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

 



On Thu, Apr 29, 2010 at 12:29:40PM -0700, Tom Lyon wrote:

> I think the plan for V4 will be to take things entirely out of the UIO
> framework, and instead have a driver which supports user mode use of
> "well-behaved" PCI devices.

I really don't think that we should create another uio-subsystem for the
kernel. The current one can be easily extended to fit your and the
virtualization needs.

> So, I will go outside UIO because:

> 1 - it doesn't allow reads and writes to sub-drivers, just irqcontrol

Can you elaborate on that? What do you mean by sub-drivers?

> 2 - it doesn't have ioctls

You already added ioctls. This is not a big deal.

> 3 - it has its own interrupt model which doesn't use eventfds

Can be extended using the ioctl.

> 4 - it's ugly doing the new stuff and maintaining backwards compat.

Not really. In the ioctls you will add to enable msi/msi-x you can pass
the eventfds to userspace. Thats not ugly at all. Its just an addition.

Here is the approach I would take:

* Add an ioctl to the uio-framework and add some basic functionality
  like querying for some device capabilities like memory regions to mmap
  or io regions.
* Add ioctls to uio-pci-generic to ask for interrupt capabilities of the
  pci device (old style irqs/msi/msi-x, how many vectors and so on) and
  ioctls to enable them and get an eventfd back for each vector.

Thats a good extension and backwards compatible as well in my eyes. What
do you think?


	Joerg

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux