From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Tom Lyon <pugs@lyon-about.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
hjk@linutronix.de, gregkh@suse.de, chrisw@sous-sol.org,
joro@8bytes.org, avi@redhat.com, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [LKML] Re: [PATCH V3] drivers/uio/uio_pci_generic.c: allow access for non-privileged processes
Date: Mon, 3 May 2010 13:47:00 -0400 [thread overview]
Message-ID: <20100503174700.GC24574@phenom.dumpdata.com> (raw)
In-Reply-To: <201004291229.40918.pugs@lyon-about.com>
On Thu, Apr 29, 2010 at 12:29:40PM -0700, Tom Lyon wrote:
> Michael, et al - sorry for the delay, but I've been digesting the comments and researching new approaches.
>
> 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 would like to use read and write to support access to memory regions, IO regions, or PCI config space. Config space is a bitch because not everything is safe to read or write, but I've come up with a table driven approach which can be run-time extended for non-compliant devices (under root control) which could then enable non-privileged users. For instance, OHCI 1394 devices use a dword in config space which is not formatted as a PCI capability, root can use sysfs to enable access:
> echo <offset> <readbits> <writebits> > /sys/dev/pci/devices/xxxx:xx:xx.x/<yyy>/config_permit
>
>
> A "well-behaved" PCI device must have memory BARs >= 4K for mmaping, must have separate memory space for MSI-X that does not need mmaping
> by the user driver, must support the PCI 2.3 interrupt masking, and must not go totally crazy with PCI config space (tg3 is real ugly, e1000 is fine).
How about page aligned BARs?
prev parent reply other threads:[~2010-05-03 17:47 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
2010-05-03 17:47 ` Konrad Rzeszutek Wilk [this message]
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=20100503174700.GC24574@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=avi@redhat.com \
--cc=chrisw@sous-sol.org \
--cc=gregkh@suse.de \
--cc=hjk@linutronix.de \
--cc=joro@8bytes.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox