From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id EAF3C4F94 for ; Mon, 30 Jul 2018 12:03:16 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jul 2018 03:03:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,422,1526367600"; d="scan'208";a="71642308" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.237.220.148]) ([10.237.220.148]) by fmsmga002.fm.intel.com with ESMTP; 30 Jul 2018 03:03:14 -0700 To: Jerin Jacob , Thomas Monjalon Cc: Takeshi Yoshimura , dev@dpdk.org References: <20180712030833.4887-1-t.yoshimura8869@gmail.com> <20180720081347.6123-1-t.yoshimura8869@gmail.com> <30652783.zuAJVELDdt@xps> <20180729084457.GA8905@jerin> From: "Burakov, Anatoly" Message-ID: Date: Mon, 30 Jul 2018 11:03:13 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v5] vfio: fix workaround of BAR mapping 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: , X-List-Received-Date: Mon, 30 Jul 2018 10:03:18 -0000 On 30-Jul-18 9:51 AM, Burakov, Anatoly wrote: > On 29-Jul-18 9:44 AM, Jerin Jacob wrote: >> -----Original Message----- >>> Date: Thu, 26 Jul 2018 11:35:43 +0200 >>> From: Thomas Monjalon >>> To: Takeshi Yoshimura >>> Cc: dev@dpdk.org, Anatoly Burakov >>> Subject: Re: [dpdk-dev] [PATCH v5] vfio: fix workaround of BAR mapping >>> >>> >>> 20/07/2018 10:13, Takeshi Yoshimura: >>>> Currently, VFIO will try to map around MSI-X table in the BARs. When >>>> MSI-X table (page-aligned) size is equal to (page-aligned) size of BAR, >>>> VFIO will just skip the BAR. >>>> >>>> Recent kernel versions will allow VFIO to map the entire BAR containing >>>> MSI-X tables (*), so instead of trying to map around the MSI-X vector >>>> or skipping the BAR entirely if it's not possible, we can now try >>>> mapping the entire BAR first. If mapping the entire BAR doesn't >>>> succeed, fall back to the old behavior of mapping around MSI-X table or >>>> skipping the BAR. >>>> >>>> (*): "vfio-pci: Allow mapping MSIX BAR", >>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ >>>> commit/?id=a32295c612c57990d17fb0f41e7134394b2f35f6 >>>> >>>> Fixes: 90a1633b2347 ("eal/linux: allow to map BARs with MSI-X tables") >>>> >>>> Signed-off-by: Takeshi Yoshimura >>>> Reviewed-by: Anatoly Burakov >> >> >> This change set breaks thunderx/octeontx platform with following >> error.(Tested with 4.9.0 kernel) >> >> EAL:   probe driver: 177d:a034 net_thunderx >> EAL:   using IOMMU type 1 (Type 1) >> EAL: pci_map_resource(): cannot mmap(44, 0xffff60200000, 0x200000, >> 0x40000000000): Invalid argument (0xffffffffffffffff) >> EAL: PCI device 0001:01:00.2 on NUMA socket 0 >> EAL:   probe driver: 177d:a034 net_thunderx >> EAL: pci_map_resource(): cannot mmap(47, 0xffff60600000, 0x200000, >> 0x40000000000): Invalid argument (0xffffffffffffffff) >> >> According Linux kernel change, user space application suppose to use >> VFIO_REGION_INFO_CAP_MSIX_MAPPABLE >> capability to detect this feature to work < 4.15 kernel. Right? if so, >> Why we >> are doing this retry based logic? > > I don't think anything's broken there - just a gratuitous error message. > > But yes, i seem to have missed the region info flag. It was my > suggestion to use the retry logic. I'll submit a patch fixing this. > The patch to fix it involves way more work than i am comfortable with submitting to rc3, so i believe we should revert this patch and postpone the change to 18.11. -- Thanks, Anatoly