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 EAFA4A04AF; Mon, 28 Sep 2020 11:11:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5827B1D686; Mon, 28 Sep 2020 11:11:05 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id E03A81D682; Mon, 28 Sep 2020 11:11:01 +0200 (CEST) IronPort-SDR: 6p5G1MCTsSEd1ghhCxF3wymZphU8nATW+sKNp4FYqwNELT5tC0AgwsbDhhTRWqy8xWg78Pis/0 BZwCfQ7vO9WQ== X-IronPort-AV: E=McAfee;i="6000,8403,9757"; a="180118315" X-IronPort-AV: E=Sophos;i="5.77,313,1596524400"; d="scan'208";a="180118315" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2020 02:10:56 -0700 IronPort-SDR: lFGKA3oYojcotiAWun3mmGHM1ZXXqAcdgpUWwmEPNn0JiUs6KqGb7DzmSjiTswjLaWjD0P0VDQ RrtvxRPmeErQ== X-IronPort-AV: E=Sophos;i="5.77,313,1596524400"; d="scan'208";a="514187411" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.213.194.10]) ([10.213.194.10]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2020 02:10:55 -0700 To: alvinx.zhang@intel.com, david.marchand@redhat.com, arybchenko@solarflare.com Cc: dev@dpdk.org, stable@dpdk.org References: <20200928063429.14148-1-alvinx.zhang@intel.com> From: "Burakov, Anatoly" Message-ID: Date: Mon, 28 Sep 2020 10:10:52 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20200928063429.14148-1-alvinx.zhang@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] bus/pci: fix mapping of PCI resources 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 28-Sep-20 7:34 AM, alvinx.zhang@intel.com wrote: > From: Alvin Zhang > > When mapping PCI bar resources around the MSI-X table, if the size > of the first part is 0, the second part should also be mapped if > its size is not 0. > > Fixes: e200535c1ca3 ("mem: drop mapping API workaround") > Cc: stable@dpdk.org > > Signed-off-by: Alvin Zhang > --- > drivers/bus/pci/linux/pci_vfio.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c > index 34b5da8..37bfda8 100644 > --- a/drivers/bus/pci/linux/pci_vfio.c > +++ b/drivers/bus/pci/linux/pci_vfio.c > @@ -565,7 +565,7 @@ > } > > /* if there's a second part, try to map it */ > - if (map_addr != NULL > + if ((map_addr != NULL || memreg[0].size == 0) > && memreg[1].offset && memreg[1].size) { > void *second_addr = RTE_PTR_ADD(bar_addr, > (uintptr_t)(memreg[1].offset - > Dupe of http://patches.dpdk.org/patch/78768/ ? -- Thanks, Anatoly