Received: from PH0PR06CU001.outbound.protection.outlook.com (mail-westus3azon11011047.outbound.protection.outlook.com [40.107.208.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 858A02EFD86 for ; Fri, 31 Oct 2025 07:46:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.208.47 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761896803; cv=fail; b=RaYjR/mgTfeIf1C+MfmGfggPDVKIiUuxvqWpZ/2tNTxOZc/gU3qPbx2xlDk7khf54WyrBpAh3umyj7h+98mCWihAF72XphpHvyJ09Awu8ntGIkSRx4dZ8tzkPPbch5owat8lN5Jm/r2VIO7pU/9YCh8+3nsiHgyV6o4ZsOmzfmA= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761896803; c=relaxed/simple; bh=j9H4Qq2jUtxw1ve683R0s9M/QscSCicAPWIQiqTslr4=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=HIFQ9LzFoIBuKMWnQ2U7HYzkmR29GrOVEGfIRjMJS2xLlAH+FmMidc9We5sN3UqmJRkyZqt/6gDLwbxzEUTbRTl5HssMqU7Oikw/vw0ffQKHTmkWj33B/WHoN/0COZrKcmiLiAEo0QIgfETvKs6OlS/15zW4mMXWx1dpSzb8hAY= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=y20qwXm5; arc=fail smtp.client-ip=40.107.208.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="y20qwXm5" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=lKI28spnnbqY3sfL+cQ0idYcTMlRCRFtPwa9vkCuDPrkyx3y76NUxcOc3CVDfPsfbf/8tsY+/5Tr0odzSotfld3FlV5tF5W2kZ/ySw7JrsrkcCXP3zEGB/4MqNH5IwdOEL3omYabtmZhIdwMnXcWecItwdyeaMHGiFhMaaMy288ZmRajiJ4PAGOk0HOPt0eqnoewf84RDakauOtdCWRLL80LBGK9YLDsTqMxIO3dNWIZByhC+kD6HFgDCCapKLZ77OmZbyuBwiOVpXPLBiUzK+KNEa+r0cTU59PUouqT20KH7A72fw2UCuSUBUEJdt/em57vHR6d7hfbVnzhB32ncw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=XqCFTEl0a4p5uxwOX3cgbfTI/rz1vGLtBw3lGhai40Y=; b=oJqZMaEhhv5accf94Aed2fafEh/DYJpgpT5frncg40lQxOh4mqoFimBs5VoofTastihHBbKdZjw7azg9xSN4I2vGu6KnE4TimhC1v2V86AVpqAHdzz1teQdSHrLSmOd3XwgMLSiTe8qSiNEqVuJre9syZExsXjE77ax21Xlsj8ih1ytrgrOjNn1wNkjoeWGCYi0CbGG/2bAOwjjezYcxnFnp+IUHv/u/eR/wkYFDmIoyiS4k1A4XHUD6/S/RtnlMViBiW66XU1AECgvzm9xSxdhqVCj3b/DFUqAhVIsOV0Z3xpeD3hznMKgfMDZO6icitrI13tg+4gMwEI4sdoW2fA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XqCFTEl0a4p5uxwOX3cgbfTI/rz1vGLtBw3lGhai40Y=; b=y20qwXm5oll1am/Q18hX4a3C2tDXPt1c2wxvR6yk4wRq3D75PgW5asNAlPDo7Ol/WXlbt/+lmS24qpxuthU1mRyG8+g8GeW4lhnEJOm/bPPO31pg15p1uRlqYmKaae8K+ExFyoyLbFx9Hz8UHUwlLaagguazUHKrcI0X7JzaBuc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from PH7PR12MB5685.namprd12.prod.outlook.com (2603:10b6:510:13c::22) by DS0PR12MB8503.namprd12.prod.outlook.com (2603:10b6:8:15a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9275.14; Fri, 31 Oct 2025 07:46:39 +0000 Received: from PH7PR12MB5685.namprd12.prod.outlook.com ([fe80::46fb:96f2:7667:7ca5]) by PH7PR12MB5685.namprd12.prod.outlook.com ([fe80::46fb:96f2:7667:7ca5%4]) with mapi id 15.20.9275.013; Fri, 31 Oct 2025 07:46:39 +0000 Message-ID: <146d57e6-29dd-4412-9786-a630574e4872@amd.com> Date: Fri, 31 Oct 2025 08:46:34 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [RFC v2 0/8] dma-buf: Add support for mapping dmabufs via interconnects To: "Kasireddy, Vivek" , Jason Gunthorpe Cc: Leon Romanovsky , Sumit Semwal , =?UTF-8?Q?Thomas_Hellstr=C3=B6m?= , Simona Vetter , "Brost, Matthew" , "Kim, Dongwon" , "dri-devel@lists.freedesktop.org" , "intel-xe@lists.freedesktop.org" , "linux-media@vger.kernel.org" , "linaro-mm-sig@lists.linaro.org" References: <20251027044712.1676175-1-vivek.kasireddy@intel.com> <20251029002726.GA1092494@nvidia.com> <20251030134310.GR1018328@nvidia.com> Content-Language: en-US From: =?UTF-8?Q?Christian_K=C3=B6nig?= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR4P281CA0088.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:cd::19) To PH7PR12MB5685.namprd12.prod.outlook.com (2603:10b6:510:13c::22) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH7PR12MB5685:EE_|DS0PR12MB8503:EE_ X-MS-Office365-Filtering-Correlation-Id: 3ed14975-397a-4fd4-a975-08de1851a014 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014|7416014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?OWJKblkvaVdQaDg5TkV3TlVvaEJXbEFSTjFjRTNkVlVFeE5VcXNpaXg3YzBQ?= =?utf-8?B?V2pPZDVzVnhVcG5kMytqait2bThsVm9rVldPSm9nbXZ1dzYya2tlM3gvUm56?= =?utf-8?B?RmF0R2lUUlNBdmFTcEt0b0R5TjNBeWYrVFl2d2w4Zyt2TmdSbE84TE12aWdP?= =?utf-8?B?RlJnRmcxVzBwQVVENTc2WnNrY1VRS1d6am8wVnVZTmhqL1dJOFJ5MGRNUlJ6?= =?utf-8?B?TjNPd0hRY0xveTVPL29UOEZNSFhLcWgveGZBb3ByMnhoM2J4bEpsaTJZS3lm?= =?utf-8?B?a2tYQlhRTndhVHYrc3hWdkpmSk8veHA2T2lDdytienk1RjdDQjhsT1k1OExB?= =?utf-8?B?T2p6cFVMdktraUhndkFpYU82bnNQcTBZYmJCZHlTVysxNEhBKzhzYVlVTmh1?= =?utf-8?B?bVNrVnZERTIvQm1QU3ViK1FvUWx1NldmMGUvRkF6OUxCeTZvTkJXdis2cDEw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UI1akRid0lqWmQw?= =?utf-8?B?V05tNE9wcDFBQWpwVmpab0FmQURxZFVVa1lhQUprcWJSdjdFOHZaekJvc1da?= =?utf-8?B?OVkvU0JBVWRvTlNkZElwVDNKRkp1bE52RWQ3b0d6ODJ4R2xqaStOMmlOdG9z?= =?utf-8?B?VURoUis3S2V4c2h2dDFKTGhJd3lIVVJmV1FRdnZ5aUw0SFhST3M0bmlSNTVC?= =?utf-8?B?QjNJYklnOW9JZ2xLbS91REQ1bDNRWk5kaWlDYzlxR1ZNbTBkQUNtcXE1clI1?= =?utf-8?B?b0hyMVZ3cGs1bkg4NUtqK0FWNzBWKzljNVN5UHRhSDg0SWxKTmdYOXlMdGF3?= =?utf-8?B?SExwbVkxdHQvOEk2U1JZdmw2N3poTzVZVFFDWHozOXlZWENsZ1Jzbi9zY3Bl?= =?utf-8?B?UGtWc3IwbStBeDBoRUpLNVNtd3RlMUtlVUJXZ0FBVnRMdVNaYWxDZmFxVUZn?= =?utf-8?B?djhkYUpxVUMvczc2UXlaZXN0UWRXMkFDTVFjQUpGV21XMmxldG16M2s5MlZh?= =?utf-8?B?V1VONnJlaUR1WTFQbWhBWXFGZTU3SFdlNUZsMTNaRjkyc29sbVl2RTdmWGlY?= =?utf-8?Q?RT458zSpqZoGYf1CO274rBpvQCfcHhAo?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH7PR12MB5685.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014)(7416014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Y2xrb0VVSjZVT1hqNjZqTnBDYXRYcjRsdU0wbWd6ZHNlN3AwZlZVejJnU0FM?= =?utf-8?B?MjViSVJNTlJLRlBGS0JnTnpBeklnUUthSnZzaXpJT0Y0SjZMVWVQelVpUW1U?= =?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cHNwcytpTHJLUnVUdjUycndLK2Z4TDFW?= =?utf-8?B?WjZ2Rlh3RldnaUVvZWZwN2RpYzNTV01tU2IrNEFXYk9WNzE3U0V1bTBaTVRV?= =?utf-8?B?NjhDSk5rS1d2eGlaVURXNlhqUjBCcXJFY0ZBN0ZLK1AyNU4zc0IwYXRvME5t?= =?utf-8?B?alVEOUdpd2dnTXdRcFI4eXhqbjdrRGpZb29OVXExUFVHY2hXdTNRVk1yM09F?= =?utf-8?Q?MqQe1q/pXQPA7AHeCCtM2eB+2?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3ed14975-397a-4fd4-a975-08de1851a014 X-MS-Exchange-CrossTenant-AuthSource: PH7PR12MB5685.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2025 07:46:39.1451 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9v3lA8I+UcCClXKAywOgJiADVBVOn+0xSvRq6lOVP0xqtOG2zK8Ck+ml785NGm49 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB8503 On 10/31/25 06:15, Kasireddy, Vivek wrote: > Hi Jason, > >> Subject: Re: [RFC v2 0/8] dma-buf: Add support for mapping dmabufs via >> interconnects >> >> On Thu, Oct 30, 2025 at 06:17:11AM +0000, Kasireddy, Vivek wrote: >>> It mostly looks OK to me but there are a few things that I want to discuss, >>> after briefly looking at the patches in your branch: >>> - I am wondering what is the benefit of the SGT compatibility stuff especially >>> when Christian suggested that he'd like to see SGT usage gone from >>> dma-buf >> >> I think to get rid of SGT we do need to put it in a little well >> defined box and then create alternatives and remove things using >> SGT. This is a long journey, and I think this is the first step. >> >> If SGT is some special case it will be harder to excise. >> >> So the next steps would be to make all the exporters directly declare >> a SGT and then remove the SGT related ops from dma_ops itself and >> remove the compat sgt in the attach logic. This is not hard, it is all >> simple mechanical work. > IMO, this SGT compatibility stuff should ideally be a separate follow-on > effort (and patch series) that would also probably include updates to > various drivers to add the SGT mapping type. Nope, just the other way around. In other words the SGT compatibility is a pre-requisite. We should first demonstrate with existing drivers that the new interface works and does what it promised to do and then extend it with new functionality. Regards, Christian. > >> >> This way the only compat requirement is to automatically give an >> import match list for a SGT only importer which is very little code in >> the core. >> >> The point is we make the SGT stuff nonspecial and fully aligned with >> the mapping type in small steps. This way neither importer nor >> exporter should have any special code to deal with interworking. >> >> To remove SGT we'd want to teach the core code how to create some kind >> of conversion mapping type, eg exporter uses SGT importer uses NEW so >> the magic conversion mapping type does the adapatation. >> >> In this way we can convert importers and exporters to use NEW in any >> order and they still interwork with each other. >> >>> eventually. Also, if matching fails, IMO, indicating that to the >>> importer (allow_ic) and having both exporter/importer fallback to >>> the current legacy mechanism would be simpler than the SGT >>> compatibility stuff. >> >> I don't want to have three paths in importers. >> >> If the importer supports SGT it should declare it in a match and the >> core code should always return a SGT match for the importer to use >> >> The importer should not have to code 'oh it is sgt but it somehow a >> little different' via an allow_ic type idea. >> >>> - Also, I thought PCIe P2P (along with SGT) use-cases are already well >> handled >>> by the existing map_dma_buf() and other interfaces. So, it might be >> confusing >>> if the newer interfaces also provide a mechanism to handle P2P although a >>> bit differently. I might be missing something here but shouldn't the existing >>> allow_peer2peer and other related stuff be left alone? >> >> P2P is part of SGT, it gets pulled into the SGT stuff as steps toward >> isolating SGT properly. Again as we move things to use native SGT >> exporters we would remove the exporter related allow_peer2peer items >> when they become unused. >> >>> - You are also adding custom attach/detach ops for each mapping_type. I >> think >>> it makes sense to reuse existing attach/detach ops if possible and initiate >> the >>> matching process from there, at-least initially. >> >> I started there, but as soon as I went to adding PAL I realized the >> attach/detach logic was completely different for each of the mapping >> types. So this is looking alot simpler. >> >> If the driver wants to share the same attach/detach ops for some of >> its mapping types then it can just set the same function pointer to >> all of them and pick up the mapping type from the attach->map_type. >> >>> - Looks like your design doesn't call for a dma_buf_map_interconnect() or >> other >>> similar helpers provided by dma-buf core that the importers can use. Is that >>> because the return type would not be known to the core? >> >> I don't want to have a single shared 'map' operation, that is the >> whole point of this design. Each mapping type has its own ops, own >> types, own function signatures that the client calls directly. >> >> No more type confusion or trying to abuse phys_addr_t, dma_addr_t, or >> scatterlist for in appropriate things. If your driver wants something >> special, like IOV, then give it proper clear types so it is >> understandable. >> >>> - And, just to confirm, with your design if I want to add a new interconnect/ >>> mapping_type (not just IOV but in general), all that is needed is to provide >> custom >>> attach/detach, match ops and one or more ops to map/unmap the address >> list >>> right? Does this mean that the role of dma-buf core would be limited to just >>> match and the exporters are expected to do most of the heavy lifting and >>> checking for stuff like dynamic importers, resv lock held, etc? >> >> I expect the core code would continue to provide wrappers and helpers >> to call the ops that can do any required common stuff. >> >> However, keep in mind, when the importer moves to use mapping type it >> also must be upgraded to use the dynamic importer flow as this API >> doesn't support non-dynamic importers using mapping type. >> >> I will add some of these remarks to the commit messages.. > Sounds good. I'll start testing/working on IOV interconnect patches based on > your design. > > Thanks, > Vivek >> >> Thanks! >> Jason