From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f180.google.com (mail-qk1-f180.google.com [209.85.222.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A229733A715 for ; Thu, 20 Nov 2025 13:20:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763644850; cv=none; b=Ot4/qORwQc6IQiAe95VLYMwgfINU2anoIfbrqrZtkxwpc5/hsoUg9wAru5orGdqpFG08U/RXaBf1CznCgSUcUqyHw+/Am6oXUzIsyVr5bdYSgt2gz2TfSKgB5dGVfVh9rmLgWZjMRu8e1KMUVqp2FXywGTDKS5F8l6uK31BL8N8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763644850; c=relaxed/simple; bh=FAIy2u4gJscDNGUshiInImCPqOKl3iOKQJH6e6Bc4JI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=j73Is1L1y/hYZPTLGyM2b1FX5oE11NPoP8+GHXxjSWSqBJH27j8ZTcBuYQpTPxx8s89sj6hK9gFFbTcg/VLnnJyL8Sm+PsBYyh31534V6ZvDQGhhe6Qsa3um+YLkIJDjJAjQLj+dnsHS2VnMEcHVUFzESOclAKx5+ex52iYODVU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b=jMJVlNB8; arc=none smtp.client-ip=209.85.222.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="jMJVlNB8" Received: by mail-qk1-f180.google.com with SMTP id af79cd13be357-8b2dcdde698so116999885a.3 for ; Thu, 20 Nov 2025 05:20:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1763644847; x=1764249647; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=GaI8T1P9V7HUSR5GC1P83jhUObFww+4fRanAKkUJgJM=; b=jMJVlNB8LyM4AYZyl088cBiSIlJ90Q1dm2hb+qOJix1EHdJs4siUbnVhSfjdoo+d8b CpJ6KfO7u7JniZDhdoBs1zVrqavLhdwn31rKFf/kVN8vkyxieUH5wcPJTih/9lZw+PEX fzdm1aYuxKCanV8/aYUVsuP51mR3HV9FaHggDK4qYX5m3Eht6ufYvvO9vptn0SOijTOl cfmQgVoxaFFQaCv0MtR3VFkL7VdP7LsWZJMB5e2tkAY+4CqMtLl57rP2UzUjo5ld0ad3 Ew7cnRVtQJOT76Gc3wbQzgtVC/yQSTJ4MullMwUuBOCRwifmwR9JypsEhj+RRVt4akF1 VX3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763644847; x=1764249647; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=GaI8T1P9V7HUSR5GC1P83jhUObFww+4fRanAKkUJgJM=; b=TwyOoWYz1y7kQ9vs2NwG3rnIJiNy+8tkR1zny0IlIOiiUfR0ssDRaHTfZJQa57TaeM od+RR/yy3jEcu0c4oTZTmrhEiWQm/H82+TQqTH9+XgS3eZf4v+3jn/sXBQtzigkV9j9F qujFldYr3/ZLn6kOHheE1jtG2xOWf+oMPpcFNgUkR/Knhv0dU/MnHVqpmu9AJIWgFZ89 Rx80UQAZTTnOH0GqRhKl89SItzkpkBjRV39AHxfVl9jUTh5TNUpbtmvV7GSiyogeF/yy 6YuvcS11DVbZ/Bz/LYvdQFFg1t5iUFCxgzX40Rxfce3DGkLa8A02dcqSEZeFopEZPEMn yDtg== X-Forwarded-Encrypted: i=1; AJvYcCXTXOJT061wKCApbocXgZWQuj0EQQ7oCwSUhoOK1CjkdrgZbqlkUQmivaVc9eO9byPrNWI=@vger.kernel.org X-Gm-Message-State: AOJu0Yxm1DmJ5gLubCofFxmeTynM4q7NvYz1uYDvPeEExKs1W0H7kQIN F0Yj9WzvrD5ImDGHyTldM/5NFTkLWHxh4NCrxJGekeY4jiFcBsEo7WVNKsLCB7wuEf8= X-Gm-Gg: ASbGncuZpWcr31nLYTQVGwdRN4elHne8+JT95ZWS2b+eLHRGFAGZEDiIv/qBMinrC8X tvl6E1UUdtjWpFcMNuljFX0P9mAJDmxkTb94Fkl1FGQ8lEc5osPNF2xG0oa6+qHgNMbc0TBgSJo EJCEQGNmS3i5Pj8ZkJDtNbzofdullsHG/AWMggCWrnHM3fYFAjJCWsJpcMNZx3ON/zfc5ASLNFt rfHllGEpu6TsDQKks3JH2DfGCJIiUQxf6aUKFoc0HFM9o3Wlt7ytTDCHGZbklV0+fMGDoZRB6HC sjF2ik1CqGonRQpPclU4kUeqID8iaQVt7X+6WExmz8o+uI/e7PwgY/51D3cUh8JdHxcxM4uBCec j3OiE1epmxuin7wh0q5ETWvTbo5jfUg3G7Uqmrg76py2xox2SaPv4/m4OdVAVig+/U86unnMLoL +0ixpnlvQVz6w/vJSclV+mDojKrDCs9vwfbRd5zdQSLy6ezoTfaY2IoOGM X-Google-Smtp-Source: AGHT+IHQ4fmxCAI4/D2tK1B8sYqUFbudidu6PckWMercsX/iRS90WBjHNHkg95yPWC8b179KW1QKQA== X-Received: by 2002:a05:620a:318a:b0:89f:27dc:6536 with SMTP id af79cd13be357-8b32a193b85mr303322785a.54.1763644847316; Thu, 20 Nov 2025 05:20:47 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-47-55-120-4.dhcp-dynamic.fibreop.ns.bellaliant.net. [47.55.120.4]) by smtp.gmail.com with ESMTPSA id af79cd13be357-8b3295c13ccsm148498285a.26.2025.11.20.05.20.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Nov 2025 05:20:46 -0800 (PST) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1vM4ac-00000000gLM-0tBz; Thu, 20 Nov 2025 09:20:46 -0400 Date: Thu, 20 Nov 2025 09:20:46 -0400 From: Jason Gunthorpe To: Christian =?utf-8?B?S8O2bmln?= Cc: Leon Romanovsky , Bjorn Helgaas , Logan Gunthorpe , Jens Axboe , Robin Murphy , Joerg Roedel , Will Deacon , Marek Szyprowski , Andrew Morton , Jonathan Corbet , Sumit Semwal , Kees Cook , "Gustavo A. R. Silva" , Ankit Agrawal , Yishai Hadas , Shameer Kolothum , Kevin Tian , Alex Williamson , Krishnakant Jaju , Matt Ochs , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, iommu@lists.linux.dev, linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, kvm@vger.kernel.org, linux-hardening@vger.kernel.org, Alex Mastro , Nicolin Chen Subject: Re: [Linaro-mm-sig] [PATCH v8 06/11] dma-buf: provide phys_vec to scatter-gather mapping routine Message-ID: <20251120132046.GU17968@ziepe.ca> References: <20251111-dmabuf-vfio-v8-0-fd9aa5df478f@nvidia.com> <20251111-dmabuf-vfio-v8-6-fd9aa5df478f@nvidia.com> <8a11b605-6ac7-48ac-8f27-22df7072e4ad@amd.com> <20251119132511.GK17968@ziepe.ca> <69436b2a-108d-4a5a-8025-c94348b74db6@amd.com> <20251119193114.GP17968@ziepe.ca> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Thu, Nov 20, 2025 at 08:08:27AM +0100, Christian König wrote: > >> The exporter should be able to decide if it actually wants to use > >> P2P when the transfer has to go through the host bridge (e.g. when > >> IOMMU/bridge routing bits are enabled). > > > > Sure, but this is a simplified helper for exporters that don't have > > choices where the memory comes from. > > That is extremely questionable as justification to put that in common DMA-buf code. FWIW we already have patches for a RDMA exporter lined up to use it as well. That's two users already... Jason