[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100501142839.GD14542@8bytes.org>
Date: Sat, 1 May 2010 16:28:40 +0200
From: Joerg Roedel <joro@...tes.org>
To: Tom Lyon <pugs@...n-about.com>
Cc: "Michael S. Tsirkin" <mst@...hat.com>, hjk@...utronix.de,
gregkh@...e.de, chrisw@...s-sol.org, avi@...hat.com,
kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V3] drivers/uio/uio_pci_generic.c: allow access for
non-privileged processes
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 linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists