From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id B385A19F5 for ; Fri, 1 Jul 2016 17:52:34 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 01 Jul 2016 08:52:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,557,1459839600"; d="scan'208";a="987161258" Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by orsmga001.jf.intel.com with ESMTP; 01 Jul 2016 08:52:32 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.125]) by IRSMSX101.ger.corp.intel.com ([169.254.1.155]) with mapi id 14.03.0248.002; Fri, 1 Jul 2016 16:52:31 +0100 From: "De Lara Guarch, Pablo" To: "Yigit, Ferruh" , "dev@dpdk.org" CC: Stephen Hemminger Thread-Topic: [dpdk-dev] [PATCH v2] igb_uio: fix possible mmap failure for Linux > v4.3 Thread-Index: AQHR06qASfReXw4nyUOSdqnC02RljKADuX3g Date: Fri, 1 Jul 2016 15:52:31 +0000 Message-ID: References: <1467372912-31113-1-git-send-email-ferruh.yigit@intel.com> <1467385678-16205-1-git-send-email-ferruh.yigit@intel.com> In-Reply-To: <1467385678-16205-1-git-send-email-ferruh.yigit@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjQ0M2UzY2MtMzI2OC00MmNjLWFiMWEtMTgxMGIyMTBkZjhhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IjVocGZxdGxoaWpTVlZ1TXFEUW1nUXNXUDJXbkc1T0dhNDFybjFVVjlmdFU9In0= x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2] igb_uio: fix possible mmap failure for Linux > v4.3 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jul 2016 15:52:35 -0000 Hi Ferruh, > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ferruh Yigit > Sent: Friday, July 01, 2016 4:08 PM > To: dev@dpdk.org > Cc: Stephen Hemminger > Subject: [dpdk-dev] [PATCH v2] igb_uio: fix possible mmap failure for Lin= ux > > v4.3 >=20 > mmap the iomem range of the PCI device fails for kernels that > enabled CONFIG_IO_STRICT_DEVMEM option: >=20 > EAL: pci_map_resource(): > cannot mmap(39, 0x7f1c51800000, 0x100000, 0x0): > Invalid argument (0xffffffffffffffff) >=20 > CONFIG_IO_STRICT_DEVMEM is introduced in Linux v4.4 and not enabled > by default: This was introduced in kernel 4.5 (change the title as well ;)) > Linux commit: 90a545e restrict /dev/mem to idle io memory ranges >=20 > As a workaround igb_uio can stop reserving PCI memory resources, from > kernel point of view iomem region looks like idle and mmap works > again. This matches uio_pci_generic usage. >=20 > With this update device iomem range is not protected against any > other kernel drivers or userspace access. But this shouldn't > be a problem for dpdk usage module since purpose of the igb_uio > module is to provide userspace access. >=20 > Fixes: af75078fece3 ("first public release") > Signed-off-by: Ferruh Yigit