From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52067C433ED for ; Thu, 6 May 2021 15:17:00 +0000 (UTC) Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by mail.kernel.org (Postfix) with ESMTP id A942660233 for ; Thu, 6 May 2021 15:16:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A942660233 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org 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