From fc08c18338ea30f37b873dd5f20fde38e28c21be Mon Sep 17 00:00:00 2001 From: Anatoly Burakov Date: Thu, 19 Nov 2020 11:32:31 +0000 Subject: [PATCH] doc: add VFIO no-IOMMU in Linux guide Currently, we have no documentation on how to use VFIO in no-IOMMU mode. Add such documentation. Signed-off-by: Anatoly Burakov Acked-by: Bruce Richardson --- doc/guides/linux_gsg/linux_drivers.rst | 27 ++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/doc/guides/linux_gsg/linux_drivers.rst b/doc/guides/linux_gsg/linux_drivers.rst index dfe0c8042c..9c2220d8d7 100644 --- a/doc/guides/linux_gsg/linux_drivers.rst +++ b/doc/guides/linux_gsg/linux_drivers.rst @@ -102,10 +102,33 @@ to use IO virtualization (such as Intel® VT-d). For proper operation of VFIO when running DPDK applications as a non-privileged user, correct permissions should also be set up. For more information, please refer to :ref:`Running_Without_Root_Privileges`. +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_noiommu_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_noiommu_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 + It may be required to unload all VFIO related-modules before probing + the module again with ``enable_unsafe_noiommu_mode=1`` parameter. + +.. warning:: + + 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. -- 2.20.1