From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 19A29A0C4E; Tue, 2 Nov 2021 16:54:17 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 061BB4114A; Tue, 2 Nov 2021 16:54:17 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 244A641139 for ; Tue, 2 Nov 2021 16:54:14 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10156"; a="218202549" X-IronPort-AV: E=Sophos;i="5.87,203,1631602800"; d="scan'208";a="218202549" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2021 08:16:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,203,1631602800"; d="scan'208";a="467770443" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by orsmga002.jf.intel.com with ESMTP; 02 Nov 2021 08:16:31 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 2 Nov 2021 08:16:31 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 2 Nov 2021 08:16:31 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Tue, 2 Nov 2021 08:16:31 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.43) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Tue, 2 Nov 2021 08:16:30 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VwklIXz57pWOg7ILxlY1FfiPNycW0plJ7+i3Ztk6Iijz+fIE791b+ooQBVmFj1V3lcyNk+tWoPuGsx0n2Fmp439TdHs1ewwAHUC6FWucXhJl9ErMYreItRZ7vqAdX3n5kpDkLLnnzWsf3FwQRMXe0J1JBht9Bo85oGpZ4IWEKRKNZEBdrBfJucdA98JqOSz3zCpN83fZslTuB1eUajuoYayggn5/gCTIR8kFUdPfN2yOXbVrJIi2YTBBYXOyNN+hNTzNeW6HauCKF35QMxISXvSLFaCMimmuJg5nEzVFPqc2V3nS8w4xo0s8JJLD180HbGjItMXdXgnNmkam5l0v+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/+9lJAshoS6gXzHJb1GkNpK8Z18zXGXnkbrIO3LPT2o=; b=Nzz75d6UOFpvd5/rWMPRazSis9uOyVZLGdXMuZSR0YahFomLzGdX0npGEENE1ojw4SqmoNV1DNiDoL0KrQmQxoSbnlmh+MrH46DrsDlaMRFgdE4dQQSOhwb2r98nTVKL+jdprygGDIgTwy9xdT1+VYYJWIvRB6Qd7Ruv4V6uApuxT+GJ5q0dXFlicxB81B+nmShSd9Y9pPF9FbLWW3CIZTO00ed7yhtVFcVpkhcx5N2+NVdUUrWkCLafIdaLQQvHD/1uNL+zgZTmE4NjeHIlfxCsP8BcGQo0ZagPJ1w2WJyLbSedjM3/GOwGdzjUiYU8Yt2UeH6Tigxwmpn9BVrSLQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/+9lJAshoS6gXzHJb1GkNpK8Z18zXGXnkbrIO3LPT2o=; b=yTztT5QIgKaz0FODPCMJMcKsdF/6uZ72pyuntY2jvFQnHIdEdc6VrpV2ZzCiO8QQPY8Dko6AxtE/QzOTrqQPQbjMSkxLVI4swRgYCUBPgy/j9BAesx/Nj4GPH1yCLUi2lF/sW0YHz404xpUuHPAJHsBymz6HNVX84XvcmorFKHQ= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5093.namprd11.prod.outlook.com (2603:10b6:510:3e::23) by PH0PR11MB4824.namprd11.prod.outlook.com (2603:10b6:510:38::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.14; Tue, 2 Nov 2021 15:16:25 +0000 Received: from PH0PR11MB5093.namprd11.prod.outlook.com ([fe80::a80e:d881:3c58:9730]) by PH0PR11MB5093.namprd11.prod.outlook.com ([fe80::a80e:d881:3c58:9730%3]) with mapi id 15.20.4649.020; Tue, 2 Nov 2021 15:16:25 +0000 Message-ID: Date: Tue, 2 Nov 2021 15:16:18 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.2.1 Content-Language: en-US From: "Burakov, Anatoly" To: , Bruce Richardson , "Ray Kinsella" , Dmitry Kozlyuk , Narcisa Ana Maria Vasile , Dmitry Malloy , Pallavi Kadam CC: , References: <043fc2d53770da8248b9cd0214775f9d41f2e0fb.1631273229.git.anatoly.burakov@intel.com> <868198b65b2e067d0fc733eb30b78dd4f8337798.1635430146.git.anatoly.burakov@intel.com> In-Reply-To: <868198b65b2e067d0fc733eb30b78dd4f8337798.1635430146.git.anatoly.burakov@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DB6PR0501CA0041.eurprd05.prod.outlook.com (2603:10a6:4:67::27) To PH0PR11MB5093.namprd11.prod.outlook.com (2603:10b6:510:3e::23) MIME-Version: 1.0 Received: from [192.168.1.10] (212.17.34.161) by DB6PR0501CA0041.eurprd05.prod.outlook.com (2603:10a6:4:67::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15 via Frontend Transport; Tue, 2 Nov 2021 15:16:23 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 27ab4469-8a7b-4b11-37b0-08d99e13bc37 X-MS-TrafficTypeDiagnostic: PH0PR11MB4824: X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3968; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tMF2Vp7y5KMwUhqZnP5fiXzGbUN5CvjPPvy7+sLnsyodsdzlsdfO+6J0JGd5iV3LghwFIVuZntivwYziOILdRLaROTbDJyOuQKBYw24HqJbYqFknOZp1gtAJvBoQNR8ZdscAD875XE212cX7riivYLHvXdLZ7VXozF7Yk4NJpJWenmmYfm8wHJONGf7UFOW8uYwyliqp5mXu5Uy/d3iFbkiE8mfkXWvMgX4+uq4ymvyiDOpL5dL+Sti666Z5t170KSH21nUIpcPkE4sIdyxQfyU9HySEJaG/YytKI0clphPYanHks2B14m9mRQJ6H1Bs7O0M+J3r4s0OG0tlvcYFRvotr9WuknRg5rj0RPIfamRvEMARepVTrSq4OqZlSqJTDlfMiYjMxS/427UvtxffofGGq7CMPVjnASXxafS8FwRIoU9ZT8sw71p5TUNUPW9eptKk/CZUoMoustyPDhozjZHl8+vZeXvZ6t9l32JFp57EixoCJPzZR0p9rB7pAkl76XatbbtL/v4Ybl5M23M8MGdgWQ0NqQPmI6CBSJ9MhzdIW1GBmr9CnJrrcxj/j4pJdJrwelCz0bFB5nf6Misa//CsqijjqRE+I6rjlzSOFCFlwARCMQ9VF4WvCw64pzrLjvrPxwBUv7goBvN53IHJA2dh/i/Bwjx4dp7dO1kFhtC1khb2o5NU1FET0r59BU/FrYqDd0zVfA4DbTDviffo9Qe9vT0Onl0gJqYKtyNMnMPmertaa7lSuDKv7hnRMDu/O75vHZFwOTqTSaxW5XAz8FUaLD4XFqmL6+w8qwDZxV/rsYJerwH88+rxFFYH83at X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5093.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(8936002)(5660300002)(2616005)(66556008)(66946007)(66476007)(31696002)(26005)(31686004)(8676002)(2906002)(4326008)(186003)(38100700002)(86362001)(316002)(508600001)(53546011)(6486002)(6666004)(82960400001)(36756003)(6636002)(16576012)(966005)(956004)(107886003)(110136005)(45980500001)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UXFaaEN1cUgyOE5mb0hLTVBuTGppVm52aW12K1hnSVNlS2dpNzFtczFZNjdV?= =?utf-8?B?dzdXUXJvOXJzbC9JY3FJSVRKaGxIUjUxdE5VaXpiTUw1MXBXbGZnd0pXeG1X?= =?utf-8?B?LzRSRG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U2pvTUZvNGZlV0V6NkFUcWxX?= =?utf-8?B?YnRScmtJSlI4ZW5WUkJhaUhpeFFiVXNTMC9yTThNYkpPa3ZUVWdqam53a29x?= =?utf-8?B?T056bTdsMHRaNFZLNXNrTTRQeUpNdURTeDkvSVdWNlpIMW5BY2lBVDFlVTFP?= =?utf-8?B?TnJubzhnTHdWS0QreHM3WTVXdzJrYzJhSHl5Rk1pL2tQaUxYUWVxSm42MkMx?= =?utf-8?B?S1JMV2ZacFBlQTd5Zi9tUTVNR3FVQnIzYlVzajNmNTAwc3VnV3c2TVgrL3Vw?= =?utf-8?B?YjFtMjRoL2I1TmdpZUx6L0RlQzNrT3JiM3JsUnhpdEtJWkc4VHR5SzNMNHF2?= =?utf-8?B?SHRFa3lHckJvRytiUEw0VktQNjRRPT0=?= X-MS-Exchange-CrossTenant-Network-Message-Id: 27ab4469-8a7b-4b11-37b0-08d99e13bc37 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5093.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Nov 2021 15:16:25.2293 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: GNYP/KuLerWq5YgUetrkwQu8d+jEvUfLA7H7KQ1DPiS5AgPdMEdlBr3q+qZXc6Bh2Foolvij7kIrkjr4UeOQ/EuMYyc3hzXqgHi/hzP4EE4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4824 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2 1/1] vfio: add page-by-page mapping API 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 28-Oct-21 3:09 PM, Anatoly Burakov wrote: > Currently, there is no way to map memory for DMA in a way that allows > unmapping it partially later, because some IOMMU's do not support > partial unmapping. There is a workaround of mapping all of these > segments separately, but this is inconvenient and silly, so this > commit adds a proper API that does it. > > This commit relies on earlier infrastructure that was built out to > support "chunking", as the concept of "chunks" is essentially the same > as page size. > > Signed-off-by: Anatoly Burakov > --- > > Notes: > v2: > - Added checks for page alignment of supplied values > - Added rte_errno values (similar to patch 103165 [1]) > > [1] http://patches.dpdk.org/project/dpdk/patch/e8c5e7ba089e2283c3cd67e4529e52fe49390eb9.1635428963.git.anatoly.burakov@intel.com/ I think this API also needs VA and IOVA addresses in an array, so that it's possible to map IOVA-discontiguous segments. This is too late for this release, so let's postpone it till 22.02. -- Thanks, Anatoly