From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dl1-f49.google.com (mail-dl1-f49.google.com [74.125.82.49]) (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 A3ED93B47E2 for ; Wed, 13 May 2026 19:18:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778699908; cv=none; b=bYoNzyfEB/g1P+nMMAK701iDWl/mVab4MeMTJfQoQlwsYfYnd8PpDehNQAQcM2o73BLsD3NAza+/py1c/6Mb6SG1nzkjW+a7yk6Ld5u4ooTXBQMZuVwS9kTcjITe8YWM7hVB5GOrMCnot8XZFQ/VFreJoANGgDMJ5iFUN3nKmZU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778699908; c=relaxed/simple; bh=pAi6YP4RjyDy00jk6oW+1Chj0bEIiFue3MJBPh2OHtg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TmxLzijsRJ4JLHpgu1A45ChP4g4qUvCbrFpxcQkEmDMbaHcoyAVF1fv/JMhGs+tAHJ1eM+HDcIC6ENfdutLsnNmzYP6G2xkyMXnmCRn6+IuT//eD7fjadSmnl3OqbYbGa+QwB/grzXbFIOpasR3hjQKGm0aNrCS1X22wSqTM1w4= 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=kgtP/+QA; arc=none smtp.client-ip=74.125.82.49 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="kgtP/+QA" Received: by mail-dl1-f49.google.com with SMTP id a92af1059eb24-1336742714fso300c88.1 for ; Wed, 13 May 2026 12:18:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1778699906; x=1779304706; 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=t4e+3qV/LYmemclDGdoZ+eZkWfztJP8QDUVxcLhLFE4=; b=kgtP/+QAajePUIABfMoeJXOvH44533EX6SbgisCIuF5XpX+QrAZwg8BZ5I1RrpGnWW OtIPTrmXNWycQHRrPtFm0ex0CFmMnxZKR1byAHG94hr5Bnq3UPpQIMbjPXfpaG8nLD39 RlH+CklRhvk/3bPcK1nRKWauTOmcvS9yZyvWy7H0bzg/tApCvrDGhPVKegT8J5woz6gZ 4LRUrVe6Pu4UUJMkh5F/nECXu3oEeAMBTtujOXMB8Pype5mni/7KHQC/coq6upHwNbJ5 g1hJQafQxUhVST5rk2aCmdCTMackoWYIuN+w5KAMfvkFfGUu47ySG8s7fmX0aRU2afd3 dPIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778699906; x=1779304706; 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=t4e+3qV/LYmemclDGdoZ+eZkWfztJP8QDUVxcLhLFE4=; b=HQor1B1s+dvz/OJR+fBlQgWvyzbO/FMJROD9W6LDLbWWNMJHo1QT5YjLlRyMdG9VNq U3tFLBs8N2bel3gR7CKOaer9ui+6rbfbQcVS1vRaXVIDLOJXN8i8Efx1EKrt/iLKAnOt My4PYVbwm7kI4DGkCWoVtq4U2LNj7cCpjjoJ9LLFdg/nT9W1JrSwTDmOfbuN3bb1TJIZ KEqvwuvdY0RKeNvHAGK34UuAel+xGLCMBnj+jC/pKXZ4NhI0/4usGhKOOHFRQBLRaLWk /whpxFcYf7PVJvgLdhO0grNNwyQIqiT2/G6OOl0pt5ujz2V7jTY7DMIQPh+Hm7DwY2/p Xc8Q== X-Gm-Message-State: AOJu0YxFKtQINe80J/ze/feEToj8JIAZpfq7wPFjwHZoxw2DMGG8jX6r B9a6mIil4P8pOrdiz0cll9oiEfqVifionGpmJ1YC+SODQP3Upvpbggovxqk5PhLyLA== X-Gm-Gg: Acq92OEmOaRvycX2oL6coXkFxm8W5zqulZ5+iBkO3uncib2h6kG/2lJJgZrkRaueAIL blyxkdvcu5/LpKf8/TFiKwnyDDCJKmTFOGZP72/4nTsUBV2ph13prSt8uio9+AIpJa8RWvQ3JsT oTGPaEzJIx26SNyRDsnV2jDBReH5KdmEbpIf/YMaWQB1r46F+YUxPWQb5rW6sW/OdXQvVH2tNQs WxmLFm4G8MqueC2RNWOPsrxuIwq48CKizvg02m/lFeD1dtxaBb8KC4dkHmVWqExdCj7bSNJD09O 6xmQeGAl8Hf210E3bfo3j8gI66cZ0xf/WdNIdDaFl5AEDBpKY5YszPKgZJXs2XKDeps2TdNk0dc ZvuG0r3RmKtavQvcg4yfJyoRP1gTatyMeuHQduxzUHn3nqPm/njs5/1umwqflr9jaFl7bvxjTwR u7+9p6qhHjhffQuKKUWzrXHZbSa1GBVWv32rB5WsWgDnhbjxDpiHIT4Bxa+js9vAYgML64mI+vn mdE7uM9 X-Received: by 2002:a05:7022:385:b0:11a:2c18:9e70 with SMTP id a92af1059eb24-134cbdd1a20mr42735c88.11.1778699904531; Wed, 13 May 2026 12:18:24 -0700 (PDT) Received: from google.com (153.46.83.34.bc.googleusercontent.com. [34.83.46.153]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-30296dcb6f6sm79812eec.17.2026.05.13.12.18.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2026 12:18:24 -0700 (PDT) Date: Wed, 13 May 2026 19:18:20 +0000 From: Samiullah Khawaja To: Jacob Pan Cc: linux-kernel@vger.kernel.org, "iommu@lists.linux.dev" , Jason Gunthorpe , Alex Williamson , Joerg Roedel , Mostafa Saleh , David Matlack , Robin Murphy , Nicolin Chen , "Tian, Kevin" , Yi Liu , Saurabh Sengar , pasha.tatashin@soleen.com, Will Deacon , Baolu Lu Subject: Re: [PATCH v5 2/9] iommufd: Support a HWPT without an iommu driver for noiommu Message-ID: References: <20260511184116.3687392-1-jacob.pan@linux.microsoft.com> <20260511184116.3687392-3-jacob.pan@linux.microsoft.com> 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; format=flowed Content-Disposition: inline In-Reply-To: <20260511184116.3687392-3-jacob.pan@linux.microsoft.com> On Mon, May 11, 2026 at 11:41:07AM -0700, Jacob Pan wrote: >From: Jason Gunthorpe > >Create just a little part of a real iommu driver, enough to >slot in under the dev_iommu_ops() and allow iommufd to call >domain_alloc_paging_flags() and fail everything else. > >This allows explicitly creating a HWPT under an IOAS. > >A new Kconfig option IOMMUFD_NOIOMMU is introduced to differentiate >from the VFIO group/container based noiommu mode. > >Signed-off-by: Jason Gunthorpe >Signed-off-by: Jacob Pan >--- >v5: > - Use the new IOMMUFD_NOIOMMU Kconfig instead of VFIO_NOIOMMU > - Use consistent wording referring to VFIO noiommu mode (Kevin) > - Copyright date fix (Kevin) >v4: > - Make iommufd_noiommu_ops const >v3: > - Add comment to explain the design difference over the > legacy noiommu VFIO code. >--- > drivers/iommu/iommufd/Kconfig | 13 +++ > drivers/iommu/iommufd/Makefile | 1 + > drivers/iommu/iommufd/hw_pagetable.c | 15 +++- > drivers/iommu/iommufd/hwpt_noiommu.c | 102 ++++++++++++++++++++++++ > drivers/iommu/iommufd/iommufd_private.h | 2 + > 5 files changed, 131 insertions(+), 2 deletions(-) > create mode 100644 drivers/iommu/iommufd/hwpt_noiommu.c > Reviewed-by: Samiullah Khawaja