From: Arnd Bergmann on
On Tuesday 08 June 2010, Randy Dunlap wrote:
> Documentation/ioctl/ioctl-number.txt | 1
> Documentation/vfio.txt | 177 +++++++
> MAINTAINERS | 7
> drivers/Kconfig | 2
> drivers/Makefile | 1
> drivers/vfio/Kconfig | 18
> drivers/vfio/Makefile | 6
> drivers/vfio/uiommu.c | 126 +++++
> drivers/vfio/vfio_dma.c | 324 ++++++++++++
> drivers/vfio/vfio_intrs.c | 191 +++++++
> drivers/vfio/vfio_main.c | 624 +++++++++++++++++++++++++
> drivers/vfio/vfio_pci_config.c | 554 ++++++++++++++++++++++
> drivers/vfio/vfio_rdwr.c | 147 +++++
> drivers/vfio/vfio_sysfs.c | 153 ++++++
> include/linux/uiommu.h | 62 ++
> include/linux/vfio.h | 200 ++++++++
> 16 files changed, 2593 insertions(+)

This seems to be missing a change to include/linux/Kbuild that
adds vfio.h to the exported files. Without the export, you cannot
use the definitions from user space programs unless they come with
their own copy of the header.

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Greg KH on
On Wed, Jun 09, 2010 at 02:04:53PM +0300, Avi Kivity wrote:
> On 06/09/2010 12:21 AM, Tom Lyon wrote:
> >The VFIO "driver" is used to allow privileged AND non-privileged processes to
> >implement user-level device drivers for any well-behaved PCI, PCI-X, and PCIe
> >devices.
> > Signed-off-by: Tom Lyon<pugs(a)cisco.com>
> >---
> >This version now requires an IOMMU domain to be set before any access to
> >device registers is granted (except that config space may be read). In
> >addition, the VFIO_DMA_MAP_ANYWHERE is dropped - it used the dma_map_sg API
> >which does not have sufficient controls around IOMMU usage. The IOMMU domain
> >is obtained from the 'uiommu' driver which is included in this patch.
> >
> >Various locking, security, and documentation issues have also been fixed.
> >
> >Please commit - it or me!
> >But seriously, who gets to commit this? Avi for KVM?
>
> Definitely not me.
>
> >or GregKH for drivers?
>
> I guess.

If this ever gets that far, I'll be glad to take it.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Michael S. Tsirkin on
On Tue, Jun 08, 2010 at 02:21:52PM -0700, Tom Lyon wrote:
> + case VFIO_DOMAIN_UNSET:
> + vfio_domain_unset(vdev);
> + ret = 0;
> + break;
> +

What if I do:
SET
mmap
UNSET

Now I have access to device which is not behind an iommu.
Simplest solution is to remove the UNSET ioctl:
it's not terribly useful anyway.

--
MST
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Konrad Rzeszutek Wilk on
> +EXPORT_SYMBOL(uiommu_fdget);

EXPORT_SYMBOL_GPL
... snip
> +EXPORT_SYMBOL(uiommu_put);

ditto.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Tom Lyon on
On Thursday 10 June 2010 10:27:36 am Konrad Rzeszutek Wilk wrote:
> > +EXPORT_SYMBOL(uiommu_fdget);
>
> EXPORT_SYMBOL_GPL
> .. snip
> > +EXPORT_SYMBOL(uiommu_put);
>
> ditto.
>

Is there a definitive explanation somewhere of when to use each?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/