From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0C414A04DD; Wed, 18 Nov 2020 16:38:27 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6B57EC942; Wed, 18 Nov 2020 16:37:51 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id D793BC900 for ; Wed, 18 Nov 2020 16:37:44 +0100 (CET) IronPort-SDR: 6jiEwyiCQgi8MZk7vm271gl7JiOG8/gsfGRm+yUu3MYH9qA8tlCQHyLq8AvvttgH9jz3FV86hw slROU5i/s0RQ== X-IronPort-AV: E=McAfee;i="6000,8403,9808"; a="171302347" X-IronPort-AV: E=Sophos;i="5.77,486,1596524400"; d="scan'208";a="171302347" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Nov 2020 07:37:42 -0800 IronPort-SDR: tlcLoZMTMKkqxK/boXQp5rkEjYRMSe7eDGcE2LxQuqTBOzWDr0kDdTzjXLDepS4Qapsucan91N syNas162xiOw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,486,1596524400"; d="scan'208";a="325628032" Received: from silpixa00399498.ir.intel.com (HELO silpixa00399498.ger.corp.intel.com) ([10.237.222.52]) by orsmga003.jf.intel.com with ESMTP; 18 Nov 2020 07:37:41 -0800 From: Anatoly Burakov To: dev@dpdk.org Cc: thomas@monjalon.net, john.mcnamara@intel.com Date: Wed, 18 Nov 2020 15:37:37 +0000 Message-Id: <398e2cb4a37e2b29b68e2be0aa4df8c4f7d40155.1605713845.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <6d1a335178212c2983a8e59b7fcf66001c9b262a.1605713845.git.anatoly.burakov@intel.com> References: <6d1a335178212c2983a8e59b7fcf66001c9b262a.1605713845.git.anatoly.burakov@intel.com> In-Reply-To: <7d1840b4184bf363e3b9ddaff0683f13b324078a.1605031542.git.anatoly.burakov@intel.com> References: <7d1840b4184bf363e3b9ddaff0683f13b324078a.1605031542.git.anatoly.burakov@intel.com> Subject: [dpdk-dev] [PATCH v2 3/4] doc: add VFIO no-IOMMU Linux GSG section X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Currently, we have no documentation on how to use VFIO in no-IOMMU mode. Add such documentation. Signed-off-by: Anatoly Burakov --- 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 a3f443db2c..741b17a644 100644 --- a/doc/guides/linux_gsg/linux_drivers.rst +++ b/doc/guides/linux_gsg/linux_drivers.rst @@ -94,9 +94,35 @@ 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_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