From: Joerg Roedel <joro@8bytes.org>
To: Tom Lyon <pugs@lyon-about.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
hjk@linutronix.de, gregkh@suse.de, chrisw@sous-sol.org,
avi@redhat.com, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH V3] drivers/uio/uio_pci_generic.c: allow access for non-privileged processes
Date: Sat, 1 May 2010 16:28:40 +0200 [thread overview]
Message-ID: <20100501142839.GD14542@8bytes.org> (raw)
In-Reply-To: <201004291229.40918.pugs@lyon-about.com>
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
next prev parent reply other threads:[~2010-05-01 14:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-19 22:05 [PATCH V3] drivers/uio/uio_pci_generic.c: allow access for non-privileged processes Tom Lyon
2010-04-21 9:38 ` Michael S. Tsirkin
2010-04-21 10:31 ` Hans J. Koch
2010-04-21 10:30 ` Michael S. Tsirkin
2010-04-29 19:29 ` Tom Lyon
2010-04-29 19:52 ` Michael S. Tsirkin
2010-05-01 14:28 ` Joerg Roedel [this message]
2010-05-03 17:47 ` [LKML] " Konrad Rzeszutek Wilk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100501142839.GD14542@8bytes.org \
--to=joro@8bytes.org \
--cc=avi@redhat.com \
--cc=chrisw@sous-sol.org \
--cc=gregkh@suse.de \
--cc=hjk@linutronix.de \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=pugs@lyon-about.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.