login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
June
»
8
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: Michael S. Tsirkin
Subject:
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
Date: Tuesday, June 8, 2010 - 2:22 pm
On Mon, Jun 07, 2010 at 12:01:04PM -0700, Tom Lyon wrote:
quoted text
> On Sunday 06 June 2010 02:54:51 am Michael S. Tsirkin wrote: > > On Thu, Jun 03, 2010 at 02:41:38PM -0700, Tom Lyon wrote: > > > OK, in the interest of making progress, I am about to embark on the following: > > > > > > 1. Create a user-iommu-domain driver - opening it will give a new empty domain. > > > Ultimately this can also populate sysfs with the state of its world, which would > > > also be a good addition to the base iommu stuff. > > > If someone closes the fd while in use, the domain stays valid anyway until users > > > drop off. > > > > > > 2. Add DOMAIN_SET and DOMAIN_UNSET ioctls to the vfio driver. Require that > > > a domain be set before using the VFIO_DMA_MAP_IOVA ioctl > > > > Require domain to be set before you allow any access to the device: > > mmap, write, read. IMO this is the only safe way to make sure userspace > > does not corrupt memory, and this removes the need to special-case > > MSI memory, play with bus master enable and hope it can be cleared without > > reset, etc. > > Michael - the light bulb finally lit for me and I now understand what you've been > saying the past few weeks. Of course you're right - we need iommu set before any > register access. I had thought that was done by default but now I see that the > dma_map_sg routine only attaches to the iommu on demand. > > So I will torpedo the MAP_ANYWHERE stuff. I'd like to keep the MAP_IOVA ioctl > with the vfio fd so that the user can still do everything with one fd. I'm thinking the > fd opens and iommu bindings could be done in a program before spinning out the > program with the user driver.
This would kind of break Avi's idea that mappings are programmed at the domain and shared by multiple devices, won't it?
quoted text
> > > > > (this is the one > > > that KVM wants). > > > > Not sure I understand. I think that MAP should be done on the domain, > > not the device, this handles pinning pages correctly and > > this way you don't need any special checks. > > > > > However, the VFIO_DMA_MAP_ANYWHERE ioctl is the one > > > which uses the dma_sg interface which has no expicit control of domains. I > > > intend to keep it the way it is, but expect only non-hypervisor programs would > > > want to use it. > > > > If we support MAP_IOVA, why is MAP_ANYWHERE useful? Can't > > non-hypervisors just pick an address? > > > > > 3. Clean up the docs and other nits that folks have found. > > > > > > Comments? > > >
--
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[PATCH] VFIO driver: Non-privileged user level PCI drivers
, Tom Lyon
, (Fri May 28, 4:07 pm)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Randy Dunlap
, (Fri May 28, 4:36 pm)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Randy Dunlap
, (Fri May 28, 4:56 pm)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Avi Kivity
, (Sat May 29, 5:16 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Michael S. Tsirkin
, (Sun May 30, 5:19 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Avi Kivity
, (Sun May 30, 5:27 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Michael S. Tsirkin
, (Sun May 30, 5:49 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Avi Kivity
, (Sun May 30, 5:59 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Avi Kivity
, (Sun May 30, 6:01 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Michael S. Tsirkin
, (Sun May 30, 6:03 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Avi Kivity
, (Sun May 30, 6:13 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Michael S. Tsirkin
, (Sun May 30, 7:53 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Avi Kivity
, (Mon May 31, 4:50 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Michael S. Tsirkin
, (Mon May 31, 10:10 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Avi Kivity
, (Tue Jun 1, 1:10 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Avi Kivity
, (Tue Jun 1, 3:28 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Michael S. Tsirkin
, (Tue Jun 1, 3:46 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Avi Kivity
, (Tue Jun 1, 5:41 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Tom Lyon
, (Tue Jun 1, 2:29 pm)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Avi Kivity
, (Tue Jun 1, 7:59 pm)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Alex Williamson
, (Tue Jun 1, 9:29 pm)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Tom Lyon
, (Tue Jun 1, 9:59 pm)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Avi Kivity
, (Tue Jun 1, 10:08 pm)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Joerg Roedel
, (Wed Jun 2, 2:42 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Avi Kivity
, (Wed Jun 2, 2:50 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Michael S. Tsirkin
, (Wed Jun 2, 2:53 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Joerg Roedel
, (Wed Jun 2, 2:53 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Joerg Roedel
, (Wed Jun 2, 3:04 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Michael S. Tsirkin
, (Wed Jun 2, 3:09 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Michael S. Tsirkin
, (Wed Jun 2, 3:15 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Joerg Roedel
, (Wed Jun 2, 3:19 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Michael S. Tsirkin
, (Wed Jun 2, 3:21 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Joerg Roedel
, (Wed Jun 2, 3:26 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Joerg Roedel
, (Wed Jun 2, 3:35 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Michael S. Tsirkin
, (Wed Jun 2, 3:38 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Michael S. Tsirkin
, (Wed Jun 2, 3:44 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Joerg Roedel
, (Wed Jun 2, 4:12 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Michael S. Tsirkin
, (Wed Jun 2, 4:21 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Avi Kivity
, (Wed Jun 2, 4:21 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Joerg Roedel
, (Wed Jun 2, 5:19 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Michael S. Tsirkin
, (Wed Jun 2, 5:34 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Joerg Roedel
, (Wed Jun 2, 5:50 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Joerg Roedel
, (Wed Jun 2, 6:02 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Avi Kivity
, (Wed Jun 2, 6:06 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Michael S. Tsirkin
, (Wed Jun 2, 6:17 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Joerg Roedel
, (Wed Jun 2, 6:53 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Joerg Roedel
, (Wed Jun 2, 7:01 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Chris Wright
, (Wed Jun 2, 9:53 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Chris Wright
, (Wed Jun 2, 10:46 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Tom Lyon
, (Wed Jun 2, 11:09 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Joerg Roedel
, (Wed Jun 2, 12:46 pm)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Avi Kivity
, (Wed Jun 2, 11:23 pm)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Tom Lyon
, (Thu Jun 3, 2:41 pm)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Michael S. Tsirkin
, (Sun Jun 6, 2:54 am)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Tom Lyon
, (Mon Jun 7, 12:01 pm)
Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers
, Michael S. Tsirkin
, (Tue Jun 8, 2:22 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Mel Gorman
Re: [PATCH 1/4] vmstat: remove zone->lock from walk_zones_in_node
Guenter Roeck
Re: [lm-sensors] Location for thermal drivers
David Woodhouse
Re: RFC: Moving firmware blobs out of the kernel.
Siddha, Suresh B
Re: [PATCH 2.6.21 review I] [11/25] x86: default to physical mode on hotplug CPU k...
Peter Zijlstra
Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)
git-commits-head
:
Linux Kernel Mailing List
[MIPS] Fix potential latency problem due to non-atomic cpu_wait.
Linux Kernel Mailing List
USB: rename USB_SPEED_VARIABLE to USB_SPEED_WIRELESS
Linux Kernel Mailing List
lib/vsprintf.c: fix bug omitting minus sign of numbers (module_param)
Linux Kernel Mailing List
[Bluetooth] Initiate authentication during connection establishment
Linux Kernel Mailing List
[POWERPC] 4xx: Add ppc40x_defconfig
linux-netdev
:
MERCEDES
Your mail id has won 950,000.00 in the MERCEDES Benz Online Promo.for claims send:
David Miller
Re: [PATCH] xen/netfront: do not mark packets of length < MSS as GSO
David Miller
Re: skb_segment() questions
Shan Wei
[RFC PATCH net-next 2/5]IPv6:netfilter: Send an ICMPv6 "Fragment Reassembly Timeou...
Stanislaw Gruszka
[PATCH 1/4] bnx2x: use smp_mb() to keep ordering of read write operations
git
:
Nicolas Sebrecht
git-svn died of signal 11 (was "3 failures on test t9100 (svn)")
Junio C Hamano
Re: [PATCH 2/2] Add url.<base>.pushInsteadOf: URL rewriting for push only
Martin Langhoff
Re: [PATCH] GIT commit statistics.
Alexandre Julliard
[PATCH] gitweb: Put back shortlog instead of graphiclog in the project list.
Josh Triplett
[PATCH 2/2] Add url.<base>.pushInsteadOf: URL rewriting for push only
openbsd-misc
:
Taisto Qvist XX
Re: AMD GEODE LX-800 just works with kernel from install42.iso and kernelpanics wi...
Nico Meijer
Re: gOS Develop Kit with VIA pc-1 Processor Platform VIA C7-D
Andreas Bihlmaier
Re: jetway board sensors (Fintek F71805F)
admin
Drive a 2009 car from R799p/m
Antti Harri
Re: how to create a sha256 hash
Colocation donated by:
Syndicate