From patchwork Tue Sep 8 16:19:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dybkowski, AdamX" X-Patchwork-Id: 76924 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2CCEAA04B1; Tue, 8 Sep 2020 18:20:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 09E101BEE1; Tue, 8 Sep 2020 18:20:40 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 95AE21DB8 for ; Tue, 8 Sep 2020 18:20:37 +0200 (CEST) IronPort-SDR: aY8b1d1S6K9JQ3vsYM5pHSAzTVZ47fkI1yiO1GpPzlsQvTPl/w02GjC4OCh2cJZ8LJj/NaaLzx H6X5LFpj4uuA== X-IronPort-AV: E=McAfee;i="6000,8403,9738"; a="138214432" X-IronPort-AV: E=Sophos;i="5.76,406,1592895600"; d="scan'208";a="138214432" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Sep 2020 09:20:37 -0700 IronPort-SDR: sex77eyfGNi1HNbRWpj4hjXACxl9tLzd6yIycrVvrLCRsmVh9zzQ5sBa7X9nD/Ay2Gh5EUXo0E 0jDfvjoFYzsw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,406,1592895600"; d="scan'208";a="317239643" Received: from adamdybx-mobl.ger.corp.intel.com ([10.104.125.77]) by orsmga002.jf.intel.com with ESMTP; 08 Sep 2020 09:20:35 -0700 From: Adam Dybkowski To: dev@dpdk.org, fiona.trahe@intel.com, akhil.goyal@nxp.com, john.mcnamara@intel.com Cc: Adam Dybkowski Date: Tue, 8 Sep 2020 18:19:50 +0200 Message-Id: <20200908161950.601-2-adamx.dybkowski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200908161950.601-1-adamx.dybkowski@intel.com> References: <20200908142047.331-1-adamx.dybkowski@intel.com> <20200908161950.601-1-adamx.dybkowski@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 1/1] doc: document vfio-pci usage with QAT PMD 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" This patch marks the old igb-uio driver as unsecure when used with the QAT PMD and updates all examples to recommend using vfio-pci instead. It also mentions security issues with the QAT CPM and provides information about the new vfio-pci parameter 'disable_denylist' available in Linux kernels 5.9 and later. Signed-off-by: Adam Dybkowski Acked-by: Fiona Trahe --- doc/guides/cryptodevs/qat.rst | 36 ++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/doc/guides/cryptodevs/qat.rst b/doc/guides/cryptodevs/qat.rst index e5d2cf499..8dd7eb083 100644 --- a/doc/guides/cryptodevs/qat.rst +++ b/doc/guides/cryptodevs/qat.rst @@ -462,7 +462,7 @@ Check that the VFs are available for use. For example ``lspci -d:37c9`` should list 48 VF devices available for a ``C62x`` device. To complete the installation follow the instructions in -`Binding the available VFs to the DPDK UIO driver`_. +`Binding the available VFs to the vfio-pci driver`_. .. Note:: @@ -534,7 +534,7 @@ Confirm the presence of 48 VF devices - 16 per PF:: lspci -d:37c9 -To complete the installation - follow instructions in `Binding the available VFs to the DPDK UIO driver`_. +To complete the installation - follow instructions in `Binding the available VFs to the vfio-pci driver`_. .. Note:: @@ -584,10 +584,21 @@ To complete the installation - follow instructions in `Binding the available VFs sudo yum install kernel-devel-`uname -r` -Binding the available VFs to the DPDK UIO driver +Binding the available VFs to the vfio-pci driver ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Unbind the VFs from the stock driver so they can be bound to the uio driver. +Notice: + +* Please note that due to security issues, the usage of older DPDK igb-uio + driver is not recommended. This document shows how to use the more secure + vfio-pci driver. +* If QAT fails to bind to vfio-pci on Linux kernel 5.9+, please see the + QATE-39220 and QATE-7495 issues in + `01.org doc `_ + which details the constraint about trusted guests and add `disable_denylist=1` + to the vfio-pci params to use QAT. See also `this patch description `_. + +Unbind the VFs from the stock driver so they can be bound to the vfio-pci driver. For an Intel(R) QuickAssist Technology DH895xCC device ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -635,25 +646,28 @@ VFs are different adjust the unbind command below:: done; \ done -Bind to the DPDK uio driver +Bind to the vfio-pci driver ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Install the DPDK igb_uio driver, bind the VF PCI Device id to it and use lspci -to confirm the VF devices are now in use by igb_uio kernel driver, +Load the vfio-pci driver, bind the VF PCI Device id to it and use lspci +to confirm the VF devices are now in use by vfio-pci kernel driver, e.g. for the C62x device:: cd to the top-level DPDK directory modprobe uio - insmod ./build/kmod/igb_uio.ko - echo "8086 37c9" > /sys/bus/pci/drivers/igb_uio/new_id + modprobe vfio-pci + echo "8086 37c9" > /sys/bus/pci/drivers/vfio-pci/new_id lspci -vvd:37c9 +Use ``modprobe vfio-pci disable_denylist=1`` from kernel 5.9 onwards. +See note in the section `Binding the available VFs to the vfio-pci driver`_ +above. -Another way to bind the VFs to the DPDK UIO driver is by using the +Another way to bind the VFs to the vfio-pci driver is by using the ``dpdk-devbind.py`` script:: cd to the top-level DPDK directory - ./usertools/dpdk-devbind.py -b igb_uio 0000:03:01.1 + ./usertools/dpdk-devbind.py -b vfio-pci 0000:03:01.1 Testing ~~~~~~~