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 5BA96A04DD; Thu, 19 Nov 2020 12:33:15 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C8D67C86E; Thu, 19 Nov 2020 12:32:42 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 2C6CB3B5 for ; Thu, 19 Nov 2020 12:32:38 +0100 (CET) IronPort-SDR: +G3Npuo+HVfyQQIjGMnfYy0j8YzC/ij/YQ40iQHnQ9b3EAFJx/BgpVsc/CiV6r5dnwyZ5kCA45 8GRE6u37tW4Q== X-IronPort-AV: E=McAfee;i="6000,8403,9809"; a="159046293" X-IronPort-AV: E=Sophos;i="5.77,490,1596524400"; d="scan'208";a="159046293" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Nov 2020 03:32:36 -0800 IronPort-SDR: 6JBfwZCikvBgBkupncB4d/VGFx6kP1YHIEmmxC7r5QKs88S+AT9DdPtj90VYyAcwBu5JVEFWAj WIHjp/W9U8PA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,490,1596524400"; d="scan'208";a="363351468" Received: from silpixa00399498.ir.intel.com (HELO silpixa00399498.ger.corp.intel.com) ([10.237.222.52]) by fmsmga002.fm.intel.com with ESMTP; 19 Nov 2020 03:32:35 -0800 From: Anatoly Burakov To: dev@dpdk.org Cc: thomas@monjalon.net, john.mcnamara@intel.com Date: Thu, 19 Nov 2020 11:32:31 +0000 Message-Id: <5d2b797b8f97381dac97bd59957df2ec96cd5239.1605785484.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <374a115faa7be0f12ce89a39ef30e518bb3b0ca3.1605785484.git.anatoly.burakov@intel.com> References: <374a115faa7be0f12ce89a39ef30e518bb3b0ca3.1605785484.git.anatoly.burakov@intel.com> In-Reply-To: <6d1a335178212c2983a8e59b7fcf66001c9b262a.1605713845.git.anatoly.burakov@intel.com> References: <6d1a335178212c2983a8e59b7fcf66001c9b262a.1605713845.git.anatoly.burakov@intel.com> Subject: [dpdk-dev] [PATCH v3 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 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