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 73DEAA04DD; Tue, 10 Nov 2020 19:10:29 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9A7AC5AB2; Tue, 10 Nov 2020 19:09:56 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id D91384CA6 for ; Tue, 10 Nov 2020 19:09:51 +0100 (CET) IronPort-SDR: DDE5E77GZrrCSTGqs5AbPnkvjf0Wi1GnnSXRi0/16KUguRqfnsXlLx0l/hc3AP8Vj4X8do3sS+ 4DPYJvD31niQ== X-IronPort-AV: E=McAfee;i="6000,8403,9801"; a="169240541" X-IronPort-AV: E=Sophos;i="5.77,467,1596524400"; d="scan'208";a="169240541" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Nov 2020 10:09:48 -0800 IronPort-SDR: F3nuRu1Wo+lJo4rlHZ9BxmlEW+6Sqy+hRj4UsGU8/MeQAJhlyepq57gHBAd0z6xqC0tuce0PBY BFgDPMz/Wa3g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,467,1596524400"; d="scan'208";a="356253542" Received: from silpixa00399498.ir.intel.com (HELO silpixa00399498.ger.corp.intel.com) ([10.237.222.52]) by fmsmga004.fm.intel.com with ESMTP; 10 Nov 2020 10:09:47 -0800 From: Anatoly Burakov To: dev@dpdk.org Cc: thomas@monjalon.net Date: Tue, 10 Nov 2020 18:09:49 +0000 Message-Id: <35caad93521712ef3dfe1f79fe4acd765f4cad07.1605031542.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <7d1840b4184bf363e3b9ddaff0683f13b324078a.1605031542.git.anatoly.burakov@intel.com> References: <7d1840b4184bf363e3b9ddaff0683f13b324078a.1605031542.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 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 --- doc/guides/linux_gsg/linux_drivers.rst | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) 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 --- -- 2.17.1