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 B808AA0524; Fri, 27 Nov 2020 17:29:39 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1ADF8C950; Fri, 27 Nov 2020 17:29:37 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by dpdk.org (Postfix) with ESMTP id 10562C93A for ; Fri, 27 Nov 2020 17:29:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606494572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5xyNFbX78P9incbehilGWtdl8jSF8jUYDQvjgiK8E/w=; b=Es2izuS58UDWM6Edwt1y0G3TbLKOyShXwvSyrnPqzL0dk6t6f5vaMxlebXzPBi/QYBSY94 uQw8jOkIyTfg7TtWMIImILMArHWSVsd77fROI0YjI+390Ww+yTw+8yCNNbqYs5dinNQfVe rGyWC6OTMK+s9zbIvm8mI6R/RHTRWEQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-552-RlaWLwwQNTKI-sdNzHyo6A-1; Fri, 27 Nov 2020 11:29:28 -0500 X-MC-Unique: RlaWLwwQNTKI-sdNzHyo6A-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5223C185E498; Fri, 27 Nov 2020 16:29:27 +0000 (UTC) Received: from [10.36.112.54] (ovpn-112-54.ams2.redhat.com [10.36.112.54]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2A86D19C46; Fri, 27 Nov 2020 16:29:25 +0000 (UTC) To: Anatoly Burakov , dev@dpdk.org Cc: thomas@monjalon.net, john.mcnamara@intel.com References: <374a115faa7be0f12ce89a39ef30e518bb3b0ca3.1605785484.git.anatoly.burakov@intel.com> <75243d22963555e1460b243df6bb12efd146abf4.1605785484.git.anatoly.burakov@intel.com> From: Kevin Traynor Message-ID: <86d65d01-54b9-8077-8927-1a33322f12df@redhat.com> Date: Fri, 27 Nov 2020 16:29:25 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <75243d22963555e1460b243df6bb12efd146abf4.1605785484.git.anatoly.burakov@intel.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v3 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" On 19/11/2020 11:32, Anatoly Burakov wrote: > 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 9c61850dbb..f3c06c68d1 100644 > --- a/doc/guides/linux_gsg/linux_drivers.rst > +++ b/doc/guides/linux_gsg/linux_drivers.rst > @@ -276,3 +276,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 may 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. > Good to have some debug hints and it avoids a backport ;-) With Bruce's s/bing/bind/ Acked-by: Kevin Traynor