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 926D5A04B8; Tue, 5 May 2020 18:26:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5E4CD1D654; Tue, 5 May 2020 18:26:13 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id E31BF1D653 for ; Tue, 5 May 2020 18:26:11 +0200 (CEST) IronPort-SDR: cV3be22waX+1SqXY6EabiRj0ql7c3SKiCS+yX7/iJA9KcH+lBcugpva4OvQj5r9/BuwCVRiifJ j0Q7/nOBDUCg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2020 09:26:10 -0700 IronPort-SDR: KJbPvkZxn392tbfdzILRyXYy7A5bCxh+A7X18QrQdbqvHmNf/c5tWuHc95UNoEl85q6DFsUfCF wrgI2vkIxzSA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,356,1583222400"; d="scan'208";a="304522776" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.213.197.31]) ([10.213.197.31]) by FMSMGA003.fm.intel.com with ESMTP; 05 May 2020 09:26:10 -0700 From: "Burakov, Anatoly" To: dev@dpdk.org References: Message-ID: <29aa9918-e7b2-9f22-c577-e6a940fa472a@intel.com> Date: Tue, 5 May 2020 17:26:09 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] mem: check DMA mask for user-supplied IOVA addresses 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 05-May-20 4:48 PM, Anatoly Burakov wrote: > Currently, external memory API will silently succeed if the IOVA > addresses supplied by the user do not fit into the DMA mask. This > can cause difficult to debug issues or accepting failed kernel > VFIO DMA mappings. > > Fix it so that if the IOVA addresses are provided, they are checked > to see if they fit into the DMA mask. > > Signed-off-by: Anatoly Burakov > --- To avoid any misunderstandings, this is only for external memory - we already do this for internal memory. See the original thread [1] for context. Also, needs Fixes: tag and a unit test, so will submit a v2 some time this week. [1] http://patches.dpdk.org/patch/69566/ -- Thanks, Anatoly