[3/4] doc: add VFIO no-IOMMU Linux GSG section

Message ID 35caad93521712ef3dfe1f79fe4acd765f4cad07.1605031542.git.anatoly.burakov@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series [1/4] doc: move VFIO driver to be first |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Burakov, Anatoly Nov. 10, 2020, 6:09 p.m. UTC
  Currently, we have no documentation on how to use VFIO in no-IOMMU mode.
Add such documentation.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 doc/guides/linux_gsg/linux_drivers.rst | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)
  

Patch

diff --git a/doc/guides/linux_gsg/linux_drivers.rst b/doc/guides/linux_gsg/linux_drivers.rst
index 34fd2f8652..4148602a63 100644
--- a/doc/guides/linux_gsg/linux_drivers.rst
+++ b/doc/guides/linux_gsg/linux_drivers.rst
@@ -75,9 +75,30 @@  To make use of full VFIO functionality, both kernel and BIOS must support and be
 For proper operation of VFIO when running DPDK applications as a non-privileged user, correct permissions should also be set up.
 This can be done by using the DPDK setup script (called ``dpdk-setup.sh`` and located in the usertools directory).
 
+VFIO no-IOMMU mode
+------------------
+
+If there is no IOMMU available on the system, VFIO can still be used, but it has
+to be loaded with an additional module parameter:
+
+.. code-block:: console
+
+    # modprobe vfio enable_unsafe_noiomu_mode=1
+
+Alternatively, one can also enable this option in an already loaded kernel module:
+
+.. code-block:: console
+
+    # echo 1 > /sys/module/vfio/parameters/enable_unsafe_noiomu_mode
+
+After that, VFIO can be used with hardware devices as usual.
+
 .. note::
 
-    VFIO can be used without IOMMU. While this is unsafe, it does make it possible for the user to keep the degree of device access and programming that VFIO has, in situations where IOMMU is not available.
+    Since no-IOMMU mode forgoes IOMMU protection, it is inherently unsafe. That
+    said, it does make it possible for the user to keep the degree of device
+    access and programming that VFIO has, in situations where IOMMU is not
+    available.
 
 UIO
 ---