DPDK patches and discussions
 help / color / mirror / Atom feed
From: Anatoly Burakov <anatoly.burakov@intel.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, john.mcnamara@intel.com
Subject: [dpdk-dev] [PATCH v3 3/4] doc: add VFIO no-IOMMU Linux GSG section
Date: Thu, 19 Nov 2020 11:32:31 +0000	[thread overview]
Message-ID: <5d2b797b8f97381dac97bd59957df2ec96cd5239.1605785484.git.anatoly.burakov@intel.com> (raw)
In-Reply-To: <374a115faa7be0f12ce89a39ef30e518bb3b0ca3.1605785484.git.anatoly.burakov@intel.com>
In-Reply-To: <6d1a335178212c2983a8e59b7fcf66001c9b262a.1605713845.git.anatoly.burakov@intel.com>

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>
---

Notes:
    v2:
    - Fixed the noiommu parameter name

 doc/guides/linux_gsg/linux_drivers.rst | 28 +++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)

diff --git a/doc/guides/linux_gsg/linux_drivers.rst b/doc/guides/linux_gsg/linux_drivers.rst
index 19ac61d8f9..9c61850dbb 100644
--- a/doc/guides/linux_gsg/linux_drivers.rst
+++ b/doc/guides/linux_gsg/linux_drivers.rst
@@ -99,9 +99,35 @@ DPDK setup script (called ``dpdk-setup.sh`` and located in the ``usertools``
 directory). 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 to keep the degree of device access and programming that VFIO has, in situations where IOMMU is not available.
+    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.
 
 UIO
 ---
-- 
2.17.1

  parent reply	other threads:[~2020-11-19 11:33 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-10 18:09 [dpdk-dev] [PATCH 1/4] doc: move VFIO driver to be first Anatoly Burakov
2020-11-10 18:09 ` [dpdk-dev] [PATCH 2/4] doc: reword VFIO and UIO Linux GSG section Anatoly Burakov
2020-11-10 18:09 ` [dpdk-dev] [PATCH 3/4] doc: add VFIO no-IOMMU " Anatoly Burakov
2020-11-10 18:09 ` [dpdk-dev] [PATCH 4/4] doc: add VFIO troubleshooting section Anatoly Burakov
2020-11-18 15:37 ` [dpdk-dev] [PATCH v2 1/4] doc: move VFIO driver to be first Anatoly Burakov
2020-11-18 18:24   ` David Marchand
2020-11-19 11:04     ` Burakov, Anatoly
2020-11-19 11:32   ` [dpdk-dev] [PATCH v3 " Anatoly Burakov
2020-11-23 17:22     ` Ferruh Yigit
2020-11-19 11:32   ` [dpdk-dev] [PATCH v3 2/4] doc: reword VFIO and UIO Linux GSG section Anatoly Burakov
2020-11-19 11:32   ` Anatoly Burakov [this message]
2020-11-27 15:47     ` [dpdk-dev] [PATCH v3 3/4] doc: add VFIO no-IOMMU " Bruce Richardson
2020-11-19 11:32   ` [dpdk-dev] [PATCH v3 4/4] doc: add VFIO troubleshooting section Anatoly Burakov
2020-11-27 15:30     ` Thomas Monjalon
2020-11-27 15:57       ` Burakov, Anatoly
2020-11-27 15:49     ` Bruce Richardson
2020-11-27 16:29     ` Kevin Traynor
2020-11-27 17:27       ` Thomas Monjalon
2020-11-18 15:37 ` [dpdk-dev] [PATCH v2 2/4] doc: reword VFIO and UIO Linux GSG section Anatoly Burakov
2020-11-18 15:37 ` [dpdk-dev] [PATCH v2 3/4] doc: add VFIO no-IOMMU " Anatoly Burakov
2020-11-18 15:37 ` [dpdk-dev] [PATCH v2 4/4] doc: add VFIO troubleshooting section Anatoly Burakov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5d2b797b8f97381dac97bd59957df2ec96cd5239.1605785484.git.anatoly.burakov@intel.com \
    --to=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=john.mcnamara@intel.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).