From: Anatoly Burakov <anatoly.burakov@intel.com> To: dev@dpdk.org Cc: thomas@monjalon.net Subject: [dpdk-dev] [PATCH 4/4] doc: add VFIO troubleshooting section Date: Tue, 10 Nov 2020 18:09:50 +0000 Message-ID: <8125335fc1a508b216ddf013fe83907277d3d5f0.1605031542.git.anatoly.burakov@intel.com> (raw) In-Reply-To: <7d1840b4184bf363e3b9ddaff0683f13b324078a.1605031542.git.anatoly.burakov@intel.com> In-Reply-To: <7d1840b4184bf363e3b9ddaff0683f13b324078a.1605031542.git.anatoly.burakov@intel.com> 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 <anatoly.burakov@intel.com> --- 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
next prev parent reply other threads:[~2020-11-10 18:10 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 ` Anatoly Burakov [this message] 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 ` [dpdk-dev] [PATCH v3 3/4] doc: add VFIO no-IOMMU " Anatoly Burakov 2020-11-27 15:47 ` 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=8125335fc1a508b216ddf013fe83907277d3d5f0.1605031542.git.anatoly.burakov@intel.com \ --to=anatoly.burakov@intel.com \ --cc=dev@dpdk.org \ --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
DPDK patches and discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \ dev@dpdk.org public-inbox-index dev Example config snippet for mirrors. Newsgroup available over NNTP: nntp://inbox.dpdk.org/inbox.dpdk.dev AGPL code for this site: git clone https://public-inbox.org/public-inbox.git