From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej2-f12.google.com (mail-ej2-f12.google.com [74.125.228.140]) (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 26C22489FAB for ; Mon, 5 Oct 2026 13:20:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.228.140 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791206470; cv=none; b=TvtvUXVP1eJPsgKCz3H3sWIf6WFGZEb/iT8ZI/GIQ1wXG7VOJ5gvrXKIKQYTxeWNI/0jqV8cOplbC2b7gnwPmm1Vvczfm4K1rg62BaEC7NpVUbEHBUGd87Z3BJSQN2o+7Vh+7IOiFY8IJYQVx+9MJ4hsQI85JVCXHxr9Oecdqu8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791206470; c=relaxed/simple; bh=SippWX+xoSkF20XXjc5MLFhzuRKSu+Feuro+st5YeiE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=dgo9tqkbd6HbIVZAV6+31fKMfE/u53VMUiG6vRnxf9ZF45aNr4rvoZHhJWYuZBhcerR6PeAGRZELm9OkvUz5Z/k9ota++sY+273vPc+Ht9EhcTBcwtDJo1fw7gmHBx2akPeGiTIOG0ce9FkJlDnju4JHMRL7fyri+dhtidKUx0k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=CyvePpA+; arc=none smtp.client-ip=74.125.228.140 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CyvePpA+" Received: by mail-ej2-f12.google.com with SMTP id a640c23a62f3a-c29703cb470so302856966b.0 for ; Mon, 05 Oct 2026 06:20:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1791206449; x=1791811249; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=h5zNn+04D/ADxwDdeMfBIdi2B0cMu31zTvDOOv1nE7U=; b=CyvePpA+5myhEw/neft3Qi0/VUFTYG5o456QppG2/5G9A7H9FId3WTbBHx92BbDih3 4LHwzEeHMw4bsVoy4ghXYLnVyzQmc3Pt0m3C+oZcTb6uwWl7nasYTcIjezFXsWeu9zER thV0rkZZZxmmS8fy2eaY0H5qWPUpLiRUvK55PN6+JGLkJRFj1bbf2KPTnHhId2DS9ugV 7Wo5kWmTBYhH07RDCvxKlHV1nwfMQkiQc5yYc7bHd0t9oNlr5C9+UadIxvLO240oDVQd HkiESF/uf7xSIHadAe3DnCy04kNQTyE/I9pVuX/PyyqPVdDsTIGcq+XqQ3i07SASQUp+ byWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791206449; x=1791811249; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=h5zNn+04D/ADxwDdeMfBIdi2B0cMu31zTvDOOv1nE7U=; b=gPjxfl+xMVqTEhgP+LZfs+3MFZsYvF2z6OFrsRMPWqd5KMWFJcsqpM6pSXJztlXTRO K2+o+FUv5l0MARvWX26wEIgvlisNLIz5K68GPhYPxjWD4AKlkgiCrCp3SfnkuGSiG+l4 CcuR80Nucfo6NaOWKpGo52dlifEsEB4Mhp+stlM9d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:9614:b0:c25:8eb7:f388 with SMTP id a640c23a62f3a-c2e4ad13957mr911322366b.17.1791206448599; Mon, 05 Oct 2026 06:20:48 -0700 (PDT) Received: from dev-dsk-fgriffo-1c-93421965.eu-west-1.amazon.com (54-240-197-234.amazon.com. [54.240.197.234]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c3156333a04sm79392466b.60.2026.10.05.06.20.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Oct 2026 06:20:48 -0700 (PDT) From: Fred Griffoul To: Paolo Bonzini , Sean Christopherson , Marc Zyngier , Oliver Upton , Sumit Semwal , =?UTF-8?q?Christian=20K=C3=B6nig?= , Jason Gunthorpe , Kevin Tian Cc: David Woodhouse , Ackerley Tng , Joey Gouly , Suzuki K Poulose , Zenghui Yu , Steffen Eiden , Catalin Marinas , Will Deacon , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H . Peter Anvin" , Joerg Roedel , Robin Murphy , Alex Williamson , Shuah Khan , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, linux-kselftest@vger.kernel.org, linux-trace-kernel@vger.kernel.org, x86@kernel.org Subject: Re: [RFC PATCH 2/6] dma-buf: Add get_phys() to describe a physical run Date: Mon, 5 Oct 2026 13:20:46 +0000 Message-ID: <20261005132046.30025-1-griffoul@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 10/5/26 Christian König wrote: > Well filling page tables by the importer is an absolutely clear NO-GO > for the DMA-buf design, we have gotten down that path already and it > took us years to remove this functionality again. Understood, thanks for the quick and clear answers on this patch and on patch 3. > The problem you are facing here is that dma_buf_mmap() doesn't work > because you don't have a VMA. Right: the memory has no struct page and is deliberately not mapped in the host, so there is no VMA to hand to KVM. I'll post a new version of this series. It drops get_phys(), the ranged invalidation and the guest_memfd dma-buf import (patches 2-5), and it does not touch drivers/dma-buf, as you suggested in the PAL discussion: https://lore.kernel.org/all/c413710b-4c28-4ed8-88ec-aeb8c4482011@amd.com/ KVM gets its frames through the KVM-private guest_memfd provider interface from David's series. iommufd gets them through a private interface with the exporter, as it already does for vfio-pci. The new version adds a small registry in iommufd for that, which replaces the symbol_get() of the sample in David's series. The dma-buf is then only the handle and the existing revoke. Thanks, Fred