From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-a2-smtp.messagingengine.com (fout-a2-smtp.messagingengine.com [103.168.172.145]) (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 A455A1DF27D; Tue, 5 May 2026 14:51:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.145 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777992666; cv=none; b=Lof0roAwhnyHbcHKoi178XOHuC4ls+0h/7gnMPwiXEr/5qc+5lZyIyvBATUk1ONSlplb6mkdi4yQyIayiJiDDxXWu7z2kWzJqs/kpHo1mLIn1vzm7BGqFd0SQ1gIzGVQ9yZQmC2G+jaY85w66jGOvm+8sK94vDvzZabedSdCM8I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777992666; c=relaxed/simple; bh=C0kAjV4pMDILIUmatYUVAuuoX1kyqtkpEFM7Vw7PqPY=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=WqGDZb99PZs5/mtT3EqsCkUyvPA2ZDvWDf6esfWK/dWg/TSS9T/0Hq8Whfo3c67+ErSZE1+iKf9qd4xLbH23AVW+i8DFSHe7URfAUwo3yCQqG+ksCnF4r3+pf0ynDcAuqd2JWaPOHd7IF5GJREHNRJ1BX9EAp23IhuKtgpM7SEQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=shazbot.org; spf=pass smtp.mailfrom=shazbot.org; dkim=pass (2048-bit key) header.d=shazbot.org header.i=@shazbot.org header.b=fXU0z364; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=AzG99EHP; arc=none smtp.client-ip=103.168.172.145 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=shazbot.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=shazbot.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=shazbot.org header.i=@shazbot.org header.b="fXU0z364"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="AzG99EHP" Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfout.phl.internal (Postfix) with ESMTP id D4E38EC017D; Tue, 5 May 2026 10:51:01 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Tue, 05 May 2026 10:51:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shazbot.org; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1777992661; x=1778079061; bh=gkDZbs2uaJHENXDOI2poVxNdOMle19rKsTDPE0HZKMA=; b= fXU0z364wpLxyhGw1FFiSVfRZctUjUqsgLbmFjICajIPr/x7ipnqLrG7lm/uwzCs It+jQB1lwqEQtgrzHP8jfg3I3uIDBO3sY/ZR8gR17sz87ibQ1L+XhXAktc6nsYdS +lYs81EzRvnPPpBDod4WMiSn02jKh9DV535B5wgFtMCtvfg5OLarzxgwvgTh2EYz w33bcZs14dAks0R79+a09NR42Y3q4pk5E6HVnlgkUt4JwPOD2XyY3JYSH5Xf6wKx URxS6lk/1jgaPF+CNpUClihp4ywhhmFymKpKHt5BhMi8gQZssgs6KDnfLfWeEl/f PAMLNlxxmAvIlCR4Ic6T/w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1777992661; x= 1778079061; bh=gkDZbs2uaJHENXDOI2poVxNdOMle19rKsTDPE0HZKMA=; b=A zG99EHPhenxS4yZZfFG60g7VrVmcxsv1fMbNLEBVDpJTlSiAWHsDj27R4bTeL2Rf PX2yLeUoWkWs12dsYqHCZNoS8DrwUQLkreK6GaWsAouQZAT5axnzUci8BPfxuhAQ 2/E2wQ5aemdhY4QwuKF3nmnmYLUt+5hZACCjl3dOsw/nxOwSl8SPGL+XdSZnVdJ7 Xne2EChYhTFlyH7MQfTSbB27vCvXZqWIuufsaSvRCP5MXc7xfEgR7UGw/OmQPD46 UbVQlOWobvrcYf9u8MbyMvJa5K1StuDEz1mEo5DsGCJRxsj/2wuGkc4nWuiupBXD +UU1wFaArRJEZivAvq7HA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgddutdduleelucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkjghfofggtgfgsehtjeertdertddvnecuhfhrohhmpeetlhgvgicu hghilhhlihgrmhhsohhnuceorghlvgigsehshhgriigsohhtrdhorhhgqeenucggtffrrg htthgvrhhnpeekheejieetffefueeiteejtdejffdvleelvdeuvdffvdefteeghfevkeeu vdefvdenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvgigsehshhgriigsohhtrdhorhhg pdhnsggprhgtphhtthhopedvtddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheplh gvohhnsehkvghrnhgvlhdrohhrghdprhgtphhtthhopehjghhgsehnvhhiughirgdrtgho mhdprhgtphhtthhopehmrghtthgvvhesmhgvthgrrdgtohhmpdhrtghpthhtoheprghmrg hsthhrohesfhgsrdgtohhmpdhrtghpthhtoheptghhrhhishhtihgrnhdrkhhovghnihhg segrmhgurdgtohhmpdhrtghpthhtohepmhhnghihrggurghmsegrmhgriihonhdruggvpd hrtghpthhtohepughmrghtlhgrtghksehgohhoghhlvgdrtghomhdprhgtphhtthhopegs jhhorhhnsehkvghrnhgvlhdrohhrghdprhgtphhtthhopehsuhhmihhtrdhsvghmfigrlh eslhhinhgrrhhordhorhhg X-ME-Proxy: Feedback-ID: i03f14258:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 5 May 2026 10:50:59 -0400 (EDT) Date: Tue, 5 May 2026 08:50:58 -0600 From: Alex Williamson To: Leon Romanovsky Cc: Jason Gunthorpe , Matt Evans , Alex Mastro , Christian =?UTF-8?B?S8O2bmln?= , Mahmoud Adam , David Matlack , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , Sumit Semwal , Kevin Tian , Ankit Agrawal , Pranjal Shrivastava , Alistair Popple , Vivek Kasireddy , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, kvm@vger.kernel.org, alex@shazbot.org Subject: Re: [PATCH 4/9] vfio/pci: Convert BAR mmap() to use a DMABUF Message-ID: <20260505085058.74c34290@shazbot.org> In-Reply-To: <20260505104911.GB11063@unreal> References: <20260416131815.2729131-1-mattev@meta.com> <20260416131815.2729131-5-mattev@meta.com> <20260501161915.75525c15@shazbot.org> <20260505104911.GB11063@unreal> X-Mailer: Claws Mail 4.3.1 (GTK 3.24.51; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 5 May 2026 13:49:11 +0300 Leon Romanovsky wrote: > On Mon, May 04, 2026 at 04:40:41AM -0300, Jason Gunthorpe wrote: > > On Fri, May 01, 2026 at 04:19:15PM -0600, Alex Williamson wrote: > > > > > Exporting dma-bufs from vfio-pci is a feature, but mmap of MMIO BARs is > > > a legacy requirement. That legacy requirement now depends on > > > PCI_P2PDMA, which depends on 64BIT and ZONE_DEVICE. > > > > That should be split up now, Leon missed it when he added the new > > APIs that didn't require ZONE_DEVICE.. > > Sorry, what did I miss here? > VFIO_DMABUF is an optional feature and is enabled only when P2P support is > available. It does not affect legacy systems where P2P cannot be enabled. If we look at the long term view of moving exclusively to cdev/iommufd, where VFIO_DMABUF becomes the mechanism for implementing P2P DMA mappings, VFIO_DMABUF may be optional, but it's highly desirable for legacy compatibility. There's an argument though that providing P2P compatibility on platforms that support PCI_P2PDMA is probably sufficient. However, in providing mmap of dmabufs as a feature, this series is wiring all mmaps through dmabufs and therefore that dependency becomes fundamental to the use of vfio-pci. Thus the discussion whether the noted config requirements could be lifted. Thanks, Alex PS - Please also weigh in on the dmabuf underflow[1] [1]https://lore.kernel.org/all/20260501131236.278ac431@shazbot.org/