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 353B2A04DD; Tue, 10 Nov 2020 19:10:52 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C8CD95B3A; Tue, 10 Nov 2020 19:09:58 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 2272B5946 for ; Tue, 10 Nov 2020 19:09:51 +0100 (CET) IronPort-SDR: NXhKR0mrfrXU+/XhndDdbqV0gLlO9TaLCQWY3hlwmiRhLYJBxd1j0EwdfjbDYGXozYpHrp5vqE kz4EXx1x62Yw== X-IronPort-AV: E=McAfee;i="6000,8403,9801"; a="169240542" X-IronPort-AV: E=Sophos;i="5.77,467,1596524400"; d="scan'208";a="169240542" 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:49 -0800 IronPort-SDR: 89ZwO4W4pQfssV1bR+QKmi3zYgEvIKURtcbalcM2jes7eWcg8ogcdVX/cEnhr+LKAcKkzJV4NQ YxUsUMQmYTHg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,467,1596524400"; d="scan'208";a="356253550" 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:48 -0800 From: Anatoly Burakov To: dev@dpdk.org Cc: thomas@monjalon.net Date: Tue, 10 Nov 2020 18:09:50 +0000 Message-Id: <8125335fc1a508b216ddf013fe83907277d3d5f0.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> MIME-Version: 1.0 In-Reply-To: <7d1840b4184bf363e3b9ddaff0683f13b324078a.1605031542.git.anatoly.burakov@intel.com> References: <7d1840b4184bf363e3b9ddaff0683f13b324078a.1605031542.git.anatoly.burakov@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 4/4] doc: add VFIO troubleshooting 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" There are common problems with VFIO that get asked over and over on the mailing list. Document common problems with VFIO and how to fix them or at least figure out what went wrong. Signed-off-by: Anatoly Burakov --- doc/guides/linux_gsg/linux_drivers.rst | 43 ++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/doc/guides/linux_gsg/linux_drivers.rst b/doc/guides/linux_gsg/linux_drivers.rst index 4148602a63..e30d91ea78 100644 --- a/doc/guides/linux_gsg/linux_drivers.rst +++ b/doc/guides/linux_gsg/linux_drivers.rst @@ -247,3 +247,46 @@ To restore device ``82:00.0`` to its original kernel binding: .. code-block:: console ./usertools/dpdk-devbind.py --bind=ixgbe 82:00.0 + +Troubleshooting VFIO +-------------------- + +In certain situations, using ``dpdk-devbind.py`` script to bing a device to VFIO +driver will fail. The first place to check is the kernel messages: + +.. code-block:: console + + # dmesg | tail + ... + [ 1297.875090] vfio-pci: probe of 0000:31:00.0 failed with error -22 + ... + +In most cases, the "error -22" indicates that the VFIO subsystem couldn't be +enabled because there is no IOMMU support. To check whether the kernel has been +booted with correct parameters, one can check the kernel command-line: + +.. code-block:: console + + # cat /proc/cmdline + +Please refer to earlier sections on how to configure kernel parameters correctly +for your system. + +If the kernel is configured correctly, one also has to make sure that the BIOS +configuration has virtualization features (such as IntelĀ® VT-d). There is no +standard way to check if the platform is configured correctly, so please check +with your platform documentation to see if it has such features, and how to +enable them. + +In certain distributions, default kernel configuration is such that the no-IOMMU +mode is disabled altogether at compile time. This can be checked in the boot +configuration of your system: + +.. code-block:: console + + # cat /boot/config-$(uname -r) | grep NOIOMMU + # CONFIG_VFIO_NOIOMMU is not set + +If ``CONFIG_VFIO_NOIOMMU`` is not enabled in the kernel configuration, VFIO +driver will not support the no-IOMMU mode, and other alternatives (such as UIO +drivers) will have to be used. -- 2.17.1