From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.56.7 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796380173; b=EomIstHuO4GzO/+4Ml3SNp/OkGe2iBeXv0vCdxq5tHKTrveapLyFhfWeSyFO86q7Argw DOWawjWsLcYvMw2gjnsEu23uSWmdRiCgUm7S8pCvRwqFEN5WtKMKFnNQMNjkvsXuxBVEJ OqzZFi3oz8Y1rCc120DH4qcKpHhvfWw8m4XdjClIYPc3KX5dLNfMxgAt5rStEJwHAMhTx W6W2j/xrYsSZMNw3cw6ha/ICdVtX7ZhyVGvh5ZBJXKWn0tODjGt3ysbIZ40XdbZqWkKsO 3em+GkpphWgdYuh3vaImwhnwajQ/ZM1mJRLE5ifrlwoHLH/b4tChakD+wr160ye5qzw== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796380173; h=DMARC-Filter:DKIM-Signature:Received:Received:Message-ID:Date: User-Agent:Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding:X-ClientProxiedBy:MIME-Version: X-MS-PublicTrafficType:X-MS-TrafficTypeDiagnostic: X-MS-Office365-Filtering-Correlation-Id:X-MS-Exchange-SenderADCheck: X-MS-Exchange-AntiSpam-Relay:X-Microsoft-Antispam: X-Microsoft-Antispam-Message-Info:X-Forefront-Antispam-Report: X-MS-Exchange-AntiSpam-MessageData-ChunkCount: X-MS-Exchange-AntiSpam-MessageData-0:X-OriginatorOrg: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-CrossTenant-Id:X-MS-Exchange-CrossTenant-MailboxType: X-MS-Exchange-CrossTenant-UserPrincipalName: X-MS-Exchange-Transport-CrossTenantHeadersStamped; bh=uL7xTBbnUiX0MMO7zsFkbWrcazRT7TxvtdhHgLy+WVQ=; b=RtIRBcO/NDAAZmhlqtLomJzB2llvRWxRuGkuUokwsGJsGymg0XBR8/3NsKle3TeO7ftF Ru9ZV9U9s+2vLfwPOfQEs/D8M2gmIWXdUL0LRC2e+fQaE3UEOZTOj+Vs3up4UoPyEkk8f qIHcBHuhbYAqtH6cZLxa/uCnKTVVur+6F8cevVdwXEgvpoWGy1Aifws1FuYv7UPQVxY1q nOTjmm6Ewizurf8WtlYV56jERn3GatKPcIL34nry0f7+6FqzdPB2SdABnqmzfv6PzhWRH epkM5Hy80DrRCh8zDMWjdJ/3b8vNO/YxoU6zzR7FsjcnBt2pkgsR184oNi/AeKU6puw== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=5NvzzSXa; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.56.7 Received: from BN1PR04CU002.outbound.protection.outlook.com (mail-eastus2azon11010007.outbound.protection.outlook.com [52.101.56.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (secp384r1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E226F606A334; Fri, 4 Dec 2026 10:29:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E226F606A334 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, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=5NvzzSXa ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=H7RSGqAXhm9HwXYMQ1X5QB26hfThnSYyKwqslB9G68DXq0xiK9RNR9s390n7HSkJANCzvur3TmPz2ghWcXVFUTCcH/RthmNBnpiFO+NjawuOA+lBhOM5NZs7z2yWiLe3cx8YcYGxnHTgWDGmv5aKjOWlX7Ri6a5tsQgZ1IkmkNwF5u9Mv8ifxa7uysDBYR6/211FN/O4VMqjhavumjoFqTTiBreLNPrNMIuYIAIf3Eg4Rto91k1Y2u62SCjndvOnSNcBS6u2WU71hN1sYrmWAw3n+q4m155/9xL12zJIpJRzDuz66cuNL72JSSLxSDRH8n5LBgrIkv+LXu83QyFbVA== 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=uL7xTBbnUiX0MMO7zsFkbWrcazRT7TxvtdhHgLy+WVQ=; b=LTKisI3JPUhHJfrghf1yhdrbcujI5iHC1WFuYdTuU2PBy6cqV48J+g91Ufi2crxx7uXLOTzYFtDZ2xrggY1p2Ebyx611KtFucLrtgvDigQy+CkKO+kDKG2Piaiju6kDTFIdu/LvP46UX2Pphi64gW8Yag/9IMNfdAZPKDTSC5UuZ3PMhVLIDzSPohvcd3XeO4OE8qbv+qYwgxE1DJx7+i/kusmgVY4eEE5jzbsAVvkgN7rffLALTiOK4SvWSuTisj/yoL+TJv+HnKggIlz09iV2IF0WQDNq0m+EIXwFJ0uPbxUTy63V8mRjlJYGYKXX5SoqqJZnbNJFgSboonf9Isg== 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=uL7xTBbnUiX0MMO7zsFkbWrcazRT7TxvtdhHgLy+WVQ=; b=5NvzzSXay2+RDBmtQQsUY8YtB8XVU4Lk3m22RwOlDXdKiHPq1WnRT8poDOZ+vHgCNT5wd9+SILqF5pICS0x2daevmCXm8b41mn7pIK7QY9v5S91vZLArR0MswLDA2qUt//C/Pp5ikZjo+V9sjRgG2w4YwpMRlBBoPU805tVgfoY= Authentication-Results: mx.microsoft.com 1; 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 DS8PR12MB701141.namprd12.prod.outlook.com (2603:10b6:8:447::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.13; Fri, 4 Dec 2026 10:29:26 +0000 Received: from PH7PR12MB5685.namprd12.prod.outlook.com ([fe80::ce69:cfae:774d:a65c]) by PH7PR12MB5685.namprd12.prod.outlook.com ([fe80::ce69:cfae:774d:a65c%3]) with mapi id 15.21.0688.011; Fri, 4 Dec 2026 10:29:24 +0000 Message-ID: Date: Fri, 4 Dec 2026 11:29:13 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 03/24] dma-buf: Add the SGT DMA mapping type To: Matthew Brost Cc: Jason Gunthorpe , Alistair Popple , Dave Airlie , Sumit Semwal , =?UTF-8?Q?Thomas_Hellstr=C3=B6m?= , Simona Vetter , Vivek Kasireddy , Dongwon Kim , Kevin Tian , Xu Yilun , Karl Mehltretter , Baolu Lu , Felix Kuehling , Alex Deucher , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org, linux-rdma@vger.kernel.org, iommu@lists.linux.dev, Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg , linux-nvme@lists.infradead.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Mina Almasry , netdev@vger.kernel.org, Alexey Kardashevskiy , zhipingz@meta.com, treding@nvidia.com, jhubbard@nvidia.com, chaitanyak@nvidia.com, Leon Romanovsky References: <20f5fb10-b71a-40f9-bbb2-f99b4002bf08@amd.com> <53a32383-4cf6-42ac-bbd5-476e69a3be5f@amd.com> <20261202013043.GC351887@ziepe.ca> <20261202132810.GE351887@ziepe.ca> 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: 8bit X-ClientProxiedBy: YT1PR01CA0154.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:2f::33) To PH7PR12MB5685.namprd12.prod.outlook.com (2603:10b6:510:13c::22) X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH7PR12MB5685:EE_|DS8PR12MB701141:EE_ X-MS-Office365-Filtering-Correlation-Id: 5f257473-f8c7-400e-10c7-08df51f1772f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|23010399003|366016|1800799024|376014|7416014|22082099003|18002099003|10067099003|56012099006|261022105027099003|261028144727099003|261026121527099003|261102123227099003|261021135927099003|261021121427099003|261102130727099003|261026140227099003|4143699003|11063799006; X-Microsoft-Antispam-Message-Info: IAn6kHDOMIaGOILgy3/Ir+Y4G3bsK/ED0El0t4+zO1iVxKkDjkIjHl+9hRbjW5yWXMZuX8MeWYpk/elU5L5h+R7tuuyhZGthfeB5KwNKe6Bht8QAPHYd6o5eUD2yN0L7gb9YJUV1LIbfo6XU1md6H8E67Ido/DkMArBtJ+F0UXyH8J6eKP8RttDcuL21nbbghNABFxH6OG/YIcfTYISlU1BTb+TaEw5WFnohJVMxvqTu2LDw8knEERnPeiJr6zYTBXpsx2NNIQroUMaBxaaVvnDoEyRIHfULQSYcVNfv7sBDbMb89rjiHLwqMNZxLf19finNe9E5MiyRHbsYQxwe5zduXTry1rZG28nWuaA26AoToK3xhf8LClrZpWEbDLKivU5Dc3fFr+Q7lPQmPnWN0GHsis0eVjcS5YJTNHPFigzh5m3HGfNWS7DSqNDqWdBvwF6w9dTYfFv9DDTN/EFG5udt0vVDvseciq7qkGnVqzSgyS0NMSP2PKMV0Gk7i5eLNkHmZ5jimN/NBEQAzkzoNs17+t1sj/RuhMpJVn6TgtR8VmNb2Hqt6S1d6bkerm7F03BHdjleQRUaa5i7hC8N+a8DY2bz+1L92Pyzjdkuj/cz1AwKaA7RYoOnZKunlGVnAM9ofrEPGpkwTbrBcyRbWEHAbr1ZMyzmarBcOk9TGOA= 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)(23010399003)(366016)(1800799024)(376014)(7416014)(22082099003)(18002099003)(10067099003)(56012099006)(261022105027099003)(261028144727099003)(261026121527099003)(261102123227099003)(261021135927099003)(261021121427099003)(261102130727099003)(261026140227099003)(4143699003)(11063799006);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?N2FSdzdIcjJaOHhZZEhRdXV3eHdOVCtDUFNsWVpXY1g1K3RubFZHTXNuRFNE?= =?utf-8?B?OUtIZ3hOS1ZHYmp6M203cVE1RzdpRElGaHRCZnhIREdoR2ljalpWSFowV0hF?= =?utf-8?B?bDBFV3JSRk9TUEIvRFp0TCs0b05pYzg4SzBRc0oxNWRKMllQT0lLUDRxR2JQ?= =?utf-8?B?VVdnSTlPRT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NDRsT0szcmpkd3d3dENj?= =?utf-8?B?TmFzVExYbW9mblUyQ2dVWEs5ZXBPejRXeXAxWWRKSVlQekk4M2ExSU91YVRO?= =?utf-8?B?bUdadkhzcE12Nm8xTjBJWm1yRFROVFhOY055dlYvTnE1VlNObnduU2EzZEhx?= =?utf-8?B?QnpFYW9MeGJKQUROUjdyK1NkcFJwNmtyWHRubS96Z09vVmVNcExOZXF0U2pY?= =?utf-8?B?c09mTVZOMjMzTGtjSHF5TXYrWit0U0NLY2lSSlJNZ0V3NGRKVFRWMndlOXZC?= =?utf-8?B?bkgrdlNPc21TeVZwNXF0cE41QWVjNGVaYW4reVlsTXdERENPSmlvQUxkYzlN?= =?utf-8?B?NG5aWHVHMFNlYXF5dW5waDhPcnlITlljUGJPb2piYTRJQ2kvRWQvdz09?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5f257473-f8c7-400e-10c7-08df51f1772f X-MS-Exchange-CrossTenant-AuthSource: PH7PR12MB5685.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Dec 2026 10:29:24.3802 (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: G3PCZ44wxCnwwsXEKHZRZ8nvUHN1Zm2Gijs1PIgNHqrmLolhVJEahg9LRKdkYvOI X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS8PR12MB701141 On 12/4/26 10:09, Matthew Brost wrote: > On Wed, Dec 02, 2026 at 02:47:54PM +0100, Christian König wrote: >> On 12/2/26 14:28, Jason Gunthorpe wrote: >>> On Wed, Dec 02, 2026 at 02:54:07PM +1100, Alistair Popple wrote: >>> >>>> So what I'm hearing is that the exporter should be unmapping as a defense >>>> against bad importers. I can definitely understand why that might be useful, >>>> especially as some kind of debug thing, but I don't think we should be basing >>>> the whole API design around the concept we can't trust importer to implement the >>>> contract correctly. Especially as that defense might not actually exist in a lot >>>> of cases anyway (eg. IOMMU disabled), in which case you have no choice but to >>>> trust the importer got things right. >>> >>> +1 >>> >>>> I also sense there might be a deeper belief that the mapping of a resource >>>> (ie. the IOVA) is something owned by the resource rather than the user of that >>>> resource. >>> >>> Well, this would be wrong. The IOVA is owned by the DMA API, the DMA >>> API is owned by its bound driver. In the kernel it is *never* owned by >>> the memory object being mapped by it. >> >> Yeah I think that pretty much nailed the disagreement. >> >> IOMMU was invented in the first place because both HW as well as it's SW driver is not trustworthy. >> >> So for system memory the IOVA should be owned by the core memory management and not the SW driver who wants to use it. >> >> The same is true for P2P mappings where the exporter who provides the backing store should handle the lifetime of the IOVA for an importer. >> >> Letting the importer manage the lifetime is like putting the fox in charge of the henhouse and IOMMU pretty much looses its purpose. >> > > Yes, but that isn't how it works when exporting hands off a physical > address. For example, this is how scale-up fabrics operate unless you > want translation on fabric ingress, a TLB miss, and network > backpressure, none of which is desirable. > > In the case of a physical address, the exporter literally cannot revoke > it unless the importer behaves according to our cross-driver contract. > > Given that, I'm really unsure what this entire thread has devolved > into - I don't have solution but I will say: > > The repeated "I'll nack this" responses, are beyond disappointing and, > in my opinion, not how a reasonable maintainer should behave. Yeah, I have to admit that I have a communication problem when working purely with mails and this is not the first occasion. In the meantime we had a call with a couple of people and that helped quite a bit to exchange the different views. I mean mails are great to let everybody participate in a discussion even across multiple times zones, but they are sometimes just not direct enough. I'm going to keep that in mind and will try to improve here. Thanks for the feedback, Christian. > > Matt > >> Christian. >> >>> >>> Jason >>