Skip to content

Commit

Permalink
vfio: Type1 IOMMU implementation
Browse files Browse the repository at this point in the history
This VFIO IOMMU backend is designed primarily for AMD-Vi and Intel
VT-d hardware, but is potentially usable by anything supporting
similar mapping functionality.  We arbitrarily call this a Type1
backend for lack of a better name.  This backend has no IOVA
or host memory mapping restrictions for the user and is optimized
for relatively static mappings.  Mapped areas are pinned into system
memory.

Signed-off-by: Alex Williamson <[email protected]>
  • Loading branch information
awilliam committed Jul 31, 2012
1 parent 4a5b2a2 commit 73fa0d1
Show file tree
Hide file tree
Showing 5 changed files with 821 additions and 1 deletion.
6 changes: 6 additions & 0 deletions drivers/vfio/Kconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
config VFIO_IOMMU_TYPE1
tristate
depends on VFIO
default n

menuconfig VFIO
tristate "VFIO Non-Privileged userspace driver framework"
depends on IOMMU_API
select VFIO_IOMMU_TYPE1 if X86
help
VFIO provides a framework for secure userspace device drivers.
See Documentation/vfio.txt for more details.
Expand Down
2 changes: 2 additions & 0 deletions drivers/vfio/Makefile
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
obj-$(CONFIG_VFIO) += vfio.o
obj-$(CONFIG_VFIO_IOMMU_TYPE1) += vfio_iommu_type1.o
obj-$(CONFIG_VFIO_PCI) += pci/
7 changes: 7 additions & 0 deletions drivers/vfio/vfio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1376,6 +1376,13 @@ static int __init vfio_init(void)

pr_info(DRIVER_DESC " version: " DRIVER_VERSION "\n");

/*
* Attempt to load known iommu-drivers. This gives us a working
* environment without the user needing to explicitly load iommu
* drivers.
*/
request_module_nowait("vfio_iommu_type1");

return 0;

err_groups_cdev:
Expand Down
Loading

0 comments on commit 73fa0d1

Please sign in to comment.