From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (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 408155C613 for ; Fri, 12 Jun 2026 15:17:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781277452; cv=none; b=aubiNTNq0LG0DtFOfaQxE52KVNOcKtoplZAA2HwXZkCS/Lu8uz1M+RXcjHA7jMhXiZSyMXghTzVXcOyyuJsLv0QmCwXGqQx6m1+5LV9MmrmCBQwQ6+eMlAj5zFHEhfdG8tLJCwSxTEhAmL9CjZEQz9INXiKNSTle4xmjR/X11Uc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781277452; c=relaxed/simple; bh=DqXswA747+6bYY1uTzSstZbbvVg2LEzGaCUeKcgc+fU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Wf5it1eEP/K2neUigIIH46P9qGyleHug8KPUao1AtwjIG1mpa2WY2I3Jnkpf4C0BV3AGdvpTsN0yUCmf3pcSKqJrnKSufCd0Rk5XjM1pkgbEDKaYJ+JVKBO7180PYKoepK6jN2h+cK6XA4mD+Ocwbto87gq2ZxTw3XnsaZsomfg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=DG9h1qWt; arc=none smtp.client-ip=209.85.214.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="DG9h1qWt" Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-2bf2911f93cso89435ad.1 for ; Fri, 12 Jun 2026 08:17:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1781277451; x=1781882251; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=TlOQuFqEcpnxb6HFkKMVShmOdVTUgHEmVlFieGLUVKw=; b=DG9h1qWtDqUFvH2jnGQe74cqO+Mcin3e9wQwaDNY/xVaRLarO/RzGty8crffvjcuX3 fjjAujlbyBfomVuH3aTvXe4PyIGGLTEf5Xd1BYWNSkl45i8himGPka1QAQRW0q4DnD/r hySU40dZSNSKcT6AGED7fRPZmITyuanDN8vPi3kf+hb6KT1GeuV05mWAinSwOYpedFZ3 kiKP+CAcnfRmjgnKc55xY+Z2azQOKILhjU8dvCrWPtR5FlrKBWoT8PvoueBCKOHeugFF TGKD6aH9kH+6pvkQPi+IE9xhG6gkXqD+kv2KRb/AZWjs/KeYbcgCH4rFOxqTD2ZP1TKq 8CGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781277451; x=1781882251; h=in-reply-to: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=TlOQuFqEcpnxb6HFkKMVShmOdVTUgHEmVlFieGLUVKw=; b=m4U0hg4d9GDDrd9E1cxV5JMuV8rFLAo0zJJvl1mUcxX/G5sbvsAWIu253Z9y2QrQoo cZKzw8HXKxPgCjgnK+iWuT6QjHghoqeICRhVrqQHGVLX5F+wSvv0LIrPXqFsUyOxtWMW SHxYhcQO8EkDpXd+e+N21aIycntquYNeZUJ2EpXCPrTFioJDcZq1+LUGo0wkMylnCcdu eyW0ooitYDqa6a80xLhlSuGJaxBPR62O4rfn1ohgNeqL6Lg4d2QQt7/l+K6O8/ZwbZmd +id9vSw+gbFs7Iwmhx0cdWcZF2Sop2Hct427p5TcWAIrIZB/8qz7NdJOcwmw2iyFv9bY 4hdw== X-Forwarded-Encrypted: i=1; AFNElJ9GbJYLUIcujhobXJ4GjE3UHciPE3X4u5Xog+qtt3+ODEhb5liQnWpYF0Nl7BW31/NJThwyOtQ8EyzAY1w=@vger.kernel.org X-Gm-Message-State: AOJu0YwiD6HmTujZZw7ENMcNtod38Vc6Htd60j48AC6pgWwUuwKZijtt VApEfEJD+IcNz0M/ArPw2KgRHddKgPxC1fwWpSZwdkH1l3aHkv2Fo9+r1pok7FIRDA== X-Gm-Gg: Acq92OFSdbvowsVF9d5UtWsNt47guA1I9pc2rnC5aTadBaeIY3ui/i0nZkRibsm2zyb WbzNK1zcpb7Mdatq0OHFReyvlD0MNamu021jNaQdV2kaCGLfopKsI6ZV+M89s6zNVOQVNM7+DqA wyWC+wpSH+Fw6bFOTiIJICbL+d+RmTyNo4UaFatWbw7k4HRDYeMkdisHVnTF5kN+fXsG2hhPpPZ Y3DURgNxaMnyCR2dTLotAMUab/mOLq42k2lyERwe43nnpKroBmmWBNT1SOPgEkqCAYX1Tb46YTE D5WX5fbAYh/nd7E02PtLgLwx1GH6SKm2UtNYYRfmpRIa0LHFN0cK8JITSpyeApqH8r52iA1I4i7 PSkrpYguE6L850njlkughWq1Ivl+qzdi5dca2nhgfcZ7nPQdX/jLi5SlSNdwTGTbcmbQ+ur97MG qYHRSb9ZAyyPalWGWNO82myD8TmOoIkkCqdfJD7LuO7Q8tCHYyu12ZnNjyB59vBhD0Q/cLiHg= X-Received: by 2002:a17:902:e805:b0:2b2:70ba:305c with SMTP id d9443c01a7336-2c3e1160718mr2635095ad.8.1781277450033; Fri, 12 Jun 2026 08:17:30 -0700 (PDT) Received: from google.com (199.255.142.34.bc.googleusercontent.com. [34.142.255.199]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2c4328a4c14sm22623545ad.43.2026.06.12.08.17.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2026 08:17:29 -0700 (PDT) Date: Fri, 12 Jun 2026 15:17:21 +0000 From: Pranjal Shrivastava To: Matt Evans Cc: "Tian, Kevin" , Alex Williamson , Leon Romanovsky , Jason Gunthorpe , Alex Mastro , Christian =?iso-8859-1?Q?K=F6nig?= , Bjorn Helgaas , Logan Gunthorpe , Mahmoud Adam , David Matlack , =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , Sumit Semwal , Ankit Agrawal , Alistair Popple , "Kasireddy, Vivek" , "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" , "linux-pci@vger.kernel.org" Subject: Re: [PATCH v3 0/9] vfio/pci: Add mmap() for DMABUFs Message-ID: References: <20260610154327.37758-1-matt@ozlabs.org> <9812ae0f-8f22-4d62-a706-4c7232a5656b@ozlabs.org> 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-Disposition: inline In-Reply-To: <9812ae0f-8f22-4d62-a706-4c7232a5656b@ozlabs.org> On Fri, Jun 12, 2026 at 04:11:50PM +0100, Matt Evans wrote: > Hi Kevin, > > On 12/06/2026 09:27, Tian, Kevin wrote: > >> From: Matt Evans > >> Sent: Wednesday, June 10, 2026 11:43 PM > >> > > [...] > >> > >> vfio/pci: Support mmap() of a VFIO DMABUF > >> > >> Adds mmap() for a DMABUF fd exported from vfio-pci. > >> > >> It was a goal to keep the VFIO device fd lifetime behaviour > >> unchanged with respect to the DMABUFs. An application can close > >> all device fds, and this will revoke/clean up all DMABUFs; no > >> mappings or other access can be performed now. When enabling > >> mmap() of the DMABUFs, this means access through the VMA is also > >> revoked. This complicates the fault handler because whilst the > >> DMABUF exists, it has no guarantee that the corresponding VFIO > >> device is still alive. Adds synchronisation ensuring the vdev is > >> available before vdev->memory_lock is touched; this holds the > >> device registration so that even if the buffer has been cleaned up, > >> vdev hasn't been freed and so the lock can be safely taken. > >> > >> This commit makes VFIO_PCI_CORE depend on PCI_P2PDMA_CORE > >> (commit > >> 1) to bring in (only) the P2PDMA provider code. > > > > the last sentence is stale as the dependency is now added in patch4. > > Right, will fix. > > >> > >> End > >> === > >> > >> This is based on VFIO next (e.g. at b9285405c5f6). > >> > > > > Sashiko failed to apply this series. Is there dependent work in vfio-next? > > > > otherwise getting a Sashiko review is helpful here. > > It _did_ depend on (at least the context of) some fixes in vfio-next. > Looks like it'll rebase on master now those are merged. I should've > re-checked this for v3, oops. :| > > (FWIW, I had Robot Claude Opus 4.8 to review several times up to v3. > But I agree, Sashiko would be interesting too. Can it be manually > triggered with branch guidance?) I guess relevant steps to run locally are here: https://github.com/sashiko-dev/sashiko/blob/main/README.md Additionally, we can try providing a base-commit (which points to a public commit). Thanks, Praan