From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792508803; b=w2U/wkeEKHAgNWEEY3Cu5sHDKR5ayZKqZ0uXYYyoq2z2LPuxm1mpdPpQQLkNmRY5tVmJ rLkfAhc5F0vB5qx3r+87dnINhJHtIv5GrKK4BsoC5zQnxgrahs/WHiDuhXGTP8sX1gx/8 IBdWYqCfPQ/qFZVFNJQwz5zAYBm7rG7Rp8A2q4GBLeEW6L1CDH8hLcK0vlVpoqdQ+Up6W trAetQjxtwfFFzhEidp53iu6IzjCD/qyMVkTkNEOUEU1/+kogm/VSWvnBc5Rf76q9Zh5q cMRBpPKPzVFbmcOKmgQFr/gYDwfqUvOsJGlqNvDCdmLxg72AOLUg9wz0bjI8uuRIBBw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792508803; h=DMARC-Filter:Received:Received:DKIM-Signature:Message-ID:Date: MIME-Version:User-Agent:Subject:To:Cc:References:From: Content-Language:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=0c2WAJ+A3fmtE5JIgmM33C+5uxJtcuzd3UjlEAxXX4c=; b=hdk1QNMouph/DLkzJxnEWoEawFLLrIzm5DfyJ8CM2NOfVMrsPgFbhxFA+wwlXAg6Fw0t 7W4o4yPGFxy76+pstS9XNIw9IpYkcHLpW8+svEUtRbyEhYNLmPPjVrPR8i2V4qRdwZ1vm pna5V18w4y57uod11xNGlBD4UgdFQp7F/Itf1hhOB9lwlO1HlI/c9ZYq/sRDLvPLB9TVO /l1dAUqeC4EsBnOJ4kKnoq+uL5aa5adIAbikoHZNNqnYwR0Mct60mvqQAKjvAE3m6z1fs O2wSOAqNnw5qVv8I5/4JRHtTtlJfv6wa7PKG+P7df9RckJxBp2iy/YF80PfXU8ufmWw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=foss header.b=qbsEPwkD; arc=none smtp.remote-ip=217.140.110.172 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B907C606A31A; Tue, 20 Oct 2026 15:06:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B907C606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=foss header.b=qbsEPwkD Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BACB516F8; Tue, 20 Oct 2026 08:06:38 -0700 (PDT) Received: from [10.0.137.15] (XHFQ2J9959-5.cambridge.arm.com [10.0.137.15]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 023503F7B4; Tue, 20 Oct 2026 08:06:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1792508801; bh=B2p95+bauGKjmtB2lfd2lV6Dt4OS4tWv6hQlDp4Cj+Y=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=qbsEPwkDD7Lc4yU5KuGZCTmflk83ca1uakWmyzyB5V+G5xona4bnVrrf8HUO7SfBD hWcREG5/ibmRlF3zEEC0SajKDIYlVtmTByzKmcih5lFG3FO5cxnsZcCqcNRrejVtTV ofgzQDwH+CmP1BeWW8uCRXFv9mqJ7hmrpsqrKaQ8= Message-ID: Date: Tue, 20 Oct 2026 16:06:37 +0100 X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH v2 12/15] vfio: Support VFIO devices that access the CPU MMU To: Jason Gunthorpe Cc: Greg Kroah-Hartman , Arnd Bergmann , Catalin Marinas , Will Deacon , Mark Rutland , Marc Zyngier , Oliver Upton , Alex Williamson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jean-Philippe Brucker , Oded Gabbay , Jonathan Corbet , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvm@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org References: <20261015142552.4128028-1-ryan.roberts@arm.com> <20261015142552.4128028-13-ryan.roberts@arm.com> <20261015164421.GD13920@nvidia.com> <95e0f9bd-0203-4c7a-9d09-622593bb3d4c@arm.com> <20261020140944.GA3008132@nvidia.com> From: Ryan Roberts Content-Language: en-GB In-Reply-To: <20261020140944.GA3008132@nvidia.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 20/10/2026 15:09, Jason Gunthorpe wrote: > On Tue, Oct 20, 2026 at 12:51:26PM +0100, Ryan Roberts wrote: >>> However.. you still have to affirm which single mm is the mm that the >>> device is going to be doing DMA against. The process the opens the fd >>> should not be forced to be the mm that it gets linked to. >> >> What is the mm representing here? Ultimately we want to install the KVM >> instance's stage2 pgtables and (pinned) VMID. We currently get that via the >> bound KVM instance (which looks like it still works using the cdev interface?) >> >> The guest will then install the stage1 pgtables and (pinned) ASID associated >> with the relevant (guest) mm_struct. >> >> Do we _need_ an mm association in the host? > > Ah.. I see, I didn't quite follow that. OK.. Ah everyone else doing > this is using iommufd with a viommu to establish their connection > between device an KVM. eg Jacob Pan's series. That's a probably a > better idea to stay aligned with the common path. Though your reasons > are a little different.. Just to check, you're referring to [1]? I was under the impression that I could open the VFIO device through the cdev interface, then bind it to the KVM instance via KVM_DEV_VFIO_FILE_ADD... Why do I need an iommufd at all? [1] https://lore.kernel.org/all/20260925190742.1575380-1-jacob.pan@linux.microsoft.com/#t Thanks, Ryan > > If you manage to get pinned VMID out of KVM then we can implement SMMU > BTM as well! > > Jason