From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DA6CDA0524; Thu, 6 May 2021 17:16:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C3EB9410EE; Thu, 6 May 2021 17:16:57 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id C1CE5410DB for ; Thu, 6 May 2021 17:16:55 +0200 (CEST) IronPort-SDR: FLaWp7M0UH0ugMCuwUa7ozExFbR2HDoHppYE43lbbNBsct8xqNrKvPYilLv+GuoPR/264kSrHh 9PL3+ZlnXtNA== X-IronPort-AV: E=McAfee;i="6200,9189,9976"; a="196474649" X-IronPort-AV: E=Sophos;i="5.82,277,1613462400"; d="scan'208";a="196474649" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2021 08:16:54 -0700 IronPort-SDR: skkmZMLaFD0z6BH/qB7qAP6p8sbn+WMqM6Cvz9WHl/eoI50jyFC/vtItq6O9MbbymVfS4ihlMd xS8lxXRpW4rQ== X-IronPort-AV: E=Sophos;i="5.82,277,1613462400"; d="scan'208";a="434401791" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.213.229.99]) ([10.213.229.99]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2021 08:16:50 -0700 To: Bruce Richardson , dev@dpdk.org Cc: Harry van Haaren References: <20210506150908.797110-1-bruce.richardson@intel.com> From: "Burakov, Anatoly" Message-ID: Date: Thu, 6 May 2021 16:16:46 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210506150908.797110-1-bruce.richardson@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] raw/ioat: fix bus requiring virtual addressing when no devs X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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 06-May-21 4:09 PM, Bruce Richardson wrote: > If after a bus scan, there are no devices using a particular bus, then > that bus should not be taken into account when deciding whether DPDK > should be run in VA or PA addressing mode. This becomes an issue when > the DSA bus driver code is used on a system without an IOMMU. The PCI > bus correctly reports that it only works in PA mode, while the DSA bus - > also correctly - reports that it works only in VA mode. The difference > is that there will be no devices found in a scan for the DSA bus, since > the kernel driver can only present those to userspace in the presence of > an IOMMU. > > While we could change DSA instance to always report that it does not > care about the addressing mode, this would imply that it could be used > with DPDK in PA mode which is not the case. Therefore, this patch > changes the driver to report DC (don't care) in the case where no > devices are present, and VA otherwise. > > NOTE: this addressing mode use of VA-only applies only in the case of > using DSA through the idxd kernel driver. The use of DSA though vfio-pci > is unaffected and works as with other PCI devices. > > Fixes: b7aaf417f936 ("raw/ioat: add bus driver for device scanning automatically") > > Reported-by: Harry van Haaren > Signed-off-by: Bruce Richardson > --- Tested-by: Anatoly Burakov -- Thanks, Anatoly