Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2229562/?format=api
{ "id": 2229562, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2229562/?format=api", "web_url": "http://patchwork.ozlabs.org/project/kvm-riscv/patch/20260428131359.34872-12-fangyu.yu@linux.alibaba.com/", "project": { "id": 70, "url": "http://patchwork.ozlabs.org/api/1.1/projects/70/?format=api", "name": "Linux KVM RISC-V", "link_name": "kvm-riscv", "list_id": "kvm-riscv.lists.infradead.org", "list_email": "kvm-riscv@lists.infradead.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20260428131359.34872-12-fangyu.yu@linux.alibaba.com>", "date": "2026-04-28T13:13:59", "name": "[RFC,11/11] iommu/riscv: support nested iommu for getting iommu hardware information", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "22fb6533f53a1f6408ea35610e69cd59d1b61385", "submitter": { "id": 91416, "url": "http://patchwork.ozlabs.org/api/1.1/people/91416/?format=api", "name": null, "email": "fangyu.yu@linux.alibaba.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/kvm-riscv/patch/20260428131359.34872-12-fangyu.yu@linux.alibaba.com/mbox/", "series": [ { "id": 501850, "url": "http://patchwork.ozlabs.org/api/1.1/series/501850/?format=api", "web_url": "http://patchwork.ozlabs.org/project/kvm-riscv/list/?series=501850", "date": "2026-04-28T13:13:48", "name": "iommu/riscv: Add hardware dirty tracking for second-stage domains", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/501850/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2229562/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2229562/checks/", "tags": {}, "headers": { "Return-Path": "\n <kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=lists.infradead.org header.i=@lists.infradead.org\n header.a=rsa-sha256 header.s=bombadil.20210309 header.b=oTdhZBkM;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n unprotected) header.d=linux.alibaba.com header.i=@linux.alibaba.com\n header.a=rsa-sha256 header.s=default header.b=H8PpUuUD;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=none (no SPF record) smtp.mailfrom=lists.infradead.org\n (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;\n envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from bombadil.infradead.org (bombadil.infradead.org\n [IPv6:2607:7c80:54:3::133])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g4grj32LTz1xrS\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 28 Apr 2026 23:14:45 +1000 (AEST)", "from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wHiGx-00000001VHz-2zrn;\n\tTue, 28 Apr 2026 13:14:43 +0000", "from out30-100.freemail.mail.aliyun.com ([115.124.30.100])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wHiGu-00000001V8k-0Z6x;\n\tTue, 28 Apr 2026 13:14:41 +0000", "from localhost.localdomain(mailfrom:fangyu.yu@linux.alibaba.com\n fp:SMTPD_---0X1ubIIu_1777382072 cluster:ay36)\n by smtp.aliyun-inc.com;\n Tue, 28 Apr 2026 21:14:33 +0800" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20210309; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:\n\tMessage-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=2o2R6gzjAw00+FLHvcHSTuT5TAuAqxdXmn/pX6FqA94=; b=oTdhZBkMHj6mZQ\n\tybOyzAKG0kEBz3YbKNPdl7YcamtZmxAJLRnWXwFfatdxGGod8azBEBE6v63MSlnLjcAW7se0wvZCJ\n\tKyIUbytSG6pcIX6uOw4/3IwVED96Pf/GUYwmBLHtcc0H8O/oxS5bbYeRWq4K4hyng5C/kj13Xvwre\n\tJ/cLpa1eSg8OwN/0jNUmYa1TP9ItDJ7bgrfqEl4ykyqqaiyuoE3OmBfqOc6QKXhmbt+LIRwYXoaPk\n\tyijuY5qAW9XbnAQQZ8NT/hW2iZ2FCUmOTKwcNtWbp3mJPfwWhTLWK/13TV7CHtY7Ej0Z2vGDvUBzE\n\t9lW717Nl+sNZsj4qcf1Q==;", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linux.alibaba.com; s=default;\n\tt=1777382077; h=From:To:Subject:Date:Message-Id:MIME-Version;\n\tbh=GTaXyo6u6wVsR7hfJRYDUBPmXTghSbJ0+BI4PVwt11c=;\n\tb=H8PpUuUDWrG2qxO4FDj3a0AJZ+pEyFbh8hPyeFL4A1qhuVBg4gykoZvlpGnODtD+F+hi8sE1m0DBiKCSwIf2WmTYm1957gex4h2dUTvx+0BvYYaHxLGdEAhFehrMN+wbtDSCma5EUw0EMRSFUP44oh3HcoTQUYbo4GVcm/7WAdU=" ], "X-Alimail-AntiSpam": "\n AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033037033178;MF=fangyu.yu@linux.alibaba.com;NM=1;PH=DS;RN=24;SR=0;TI=SMTPD_---0X1ubIIu_1777382072;", "From": "fangyu.yu@linux.alibaba.com", "To": "joro@8bytes.org,\n\twill@kernel.org,\n\trobin.murphy@arm.com,\n\tpjw@kernel.org,\n\tpalmer@dabbelt.com,\n\taou@eecs.berkeley.edu,\n\talex@ghiti.fr,\n\ttjeznach@rivosinc.com,\n\tjgg@ziepe.ca,\n\tkevin.tian@intel.com,\n\tbaolu.lu@linux.intel.com,\n\tvasant.hegde@amd.com,\n\tanup@brainfault.org,\n\tatish.patra@linux.dev,\n\tskhawaja@google.com,\n\tjgg@nvidia.com", "Cc": "guoren@kernel.org,\n\tkvm@vger.kernel.org,\n\tiommu@lists.linux.dev,\n\tkvm-riscv@lists.infradead.org,\n\tlinux-riscv@lists.infradead.org,\n\tlinux-kernel@vger.kernel.org,\n\tZong Li <zong.li@sifive.com>,\n\tFangyu Yu <fangyu.yu@linux.alibaba.com>", "Subject": "[RFC PATCH 11/11] iommu/riscv: support nested iommu for getting iommu\n hardware information", "Date": "Tue, 28 Apr 2026 21:13:59 +0800", "Message-Id": "<20260428131359.34872-12-fangyu.yu@linux.alibaba.com>", "X-Mailer": "git-send-email 2.39.3 (Apple Git-146)", "In-Reply-To": "<20260428131359.34872-1-fangyu.yu@linux.alibaba.com>", "References": "<20260428131359.34872-1-fangyu.yu@linux.alibaba.com>", "MIME-Version": "1.0", "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ", "X-CRM114-CacheID": "sfid-20260428_061440_396581_31CCD12E ", "X-CRM114-Status": "GOOD ( 10.08 )", "X-Spam-Score": "-17.6 (-----------------)", "X-Spam-Report": "Spam detection software,\n running on the system \"bombadil.infradead.org\",\n has NOT identified this incoming email as spam. The original\n message has been attached to this so you can view it or label\n similar future email. If you have any questions, see\n the administrator of that system for details.\n Content preview: From: Zong Li <zong.li@sifive.com> This patch implements\n .hw_info\n operation and the related data structures for passing the IOMMU hardware\n capabilities for iommufd. Signed-off-by: Zong Li <zong.li@sifive.com>\n Reviewed-by:\n Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Fangyu Yu\n <fangyu.yu@linux.alibaba.com>\n --- drivers/iommu/riscv/iommu.c | 19 ++++++++++++++++++ [...]\n Content analysis details: (-17.6 points, 5.0 required)\n pts rule name description\n ---- ----------------------\n --------------------------------------------------\n -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no\n trust\n [115.124.30.100 listed in list.dnswl.org]\n -7.5 USER_IN_DEF_SPF_WL From: address is in the default SPF welcome-list\n 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record\n -0.0 SPF_PASS SPF: sender matches SPF record\n -7.5 USER_IN_DEF_DKIM_WL From: address is in the default DKIM welcome-list\n -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from\n envelope-from domain\n 0.1 DKIM_SIGNED Message has a DKIM or DK signature,\n not necessarily valid\n -0.1 DKIM_VALID Message has at least one valid DKIM or DK\n signature\n -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n author's\n domain\n -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%\n [score: 0.0000]\n -0.5 ENV_AND_HDR_SPF_MATCH Env and Hdr From used in default SPF WL Match\n 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay\n lines", "X-BeenThere": "kvm-riscv@lists.infradead.org", "X-Mailman-Version": "2.1.34", "Precedence": "list", "List-Id": "<kvm-riscv.lists.infradead.org>", "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/kvm-riscv>,\n <mailto:kvm-riscv-request@lists.infradead.org?subject=unsubscribe>", "List-Archive": "<http://lists.infradead.org/pipermail/kvm-riscv/>", "List-Post": "<mailto:kvm-riscv@lists.infradead.org>", "List-Help": "<mailto:kvm-riscv-request@lists.infradead.org?subject=help>", "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/kvm-riscv>,\n <mailto:kvm-riscv-request@lists.infradead.org?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Sender": "\"kvm-riscv\" <kvm-riscv-bounces@lists.infradead.org>", "Errors-To": "kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org" }, "content": "From: Zong Li <zong.li@sifive.com>\n\nThis patch implements .hw_info operation and the related data\nstructures for passing the IOMMU hardware capabilities for iommufd.\n\nSigned-off-by: Zong Li <zong.li@sifive.com>\nReviewed-by: Jason Gunthorpe <jgg@nvidia.com>\nSigned-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com>\n---\n drivers/iommu/riscv/iommu.c | 19 +++++++++++++++++++\n include/uapi/linux/iommufd.h | 18 ++++++++++++++++++\n 2 files changed, 37 insertions(+)", "diff": "diff --git a/drivers/iommu/riscv/iommu.c b/drivers/iommu/riscv/iommu.c\nindex cb9d315e82ee..9abf446e1b85 100644\n--- a/drivers/iommu/riscv/iommu.c\n+++ b/drivers/iommu/riscv/iommu.c\n@@ -1556,8 +1556,27 @@ static void riscv_iommu_release_device(struct device *dev)\n \tkfree_rcu_mightsleep(info);\n }\n \n+static void *riscv_iommu_hw_info(struct device *dev, u32 *length, u32 *type)\n+{\n+\tstruct riscv_iommu_device *iommu = dev_to_iommu(dev);\n+\tstruct iommu_hw_info_riscv_iommu *info;\n+\n+\tinfo = kzalloc_obj(*info);\n+\tif (!info)\n+\t\treturn ERR_PTR(-ENOMEM);\n+\n+\tinfo->capability = iommu->caps;\n+\tinfo->fctl = riscv_iommu_readl(iommu, RISCV_IOMMU_REG_FCTL);\n+\n+\t*length = sizeof(*info);\n+\t*type = IOMMU_HW_INFO_TYPE_RISCV_IOMMU;\n+\n+\treturn info;\n+}\n+\n static const struct iommu_ops riscv_iommu_ops = {\n \t.of_xlate = riscv_iommu_of_xlate,\n+\t.hw_info = riscv_iommu_hw_info,\n \t.capable = riscv_iommu_capable,\n \t.identity_domain = &riscv_iommu_identity_domain,\n \t.blocked_domain = &riscv_iommu_blocking_domain,\ndiff --git a/include/uapi/linux/iommufd.h b/include/uapi/linux/iommufd.h\nindex e998dfbd6960..79d3dc5e8d19 100644\n--- a/include/uapi/linux/iommufd.h\n+++ b/include/uapi/linux/iommufd.h\n@@ -660,6 +660,22 @@ struct iommu_hw_info_amd {\n \t__aligned_u64 efr2;\n };\n \n+/**\n+ * struct iommu_hw_info_riscv_iommu - RISCV IOMMU hardware information\n+ *\n+ * @capability: Value of RISC-V IOMMU capability register defined in\n+ * RISC-V IOMMU spec section 5.3 IOMMU capabilities\n+ * @fctl: Value of RISC-V IOMMU feature control register defined in\n+ * RISC-V IOMMU spec section 5.4 Features-control register\n+ *\n+ * Don't advertise ATS support to the guest because driver doesn't support it.\n+ */\n+struct iommu_hw_info_riscv_iommu {\n+\t__aligned_u64 capability;\n+\t__u32 fctl;\n+\t__u32 __reserved;\n+};\n+\n /**\n * enum iommu_hw_info_type - IOMMU Hardware Info Types\n * @IOMMU_HW_INFO_TYPE_NONE: Output by the drivers that do not report hardware\n@@ -670,6 +686,7 @@ struct iommu_hw_info_amd {\n * @IOMMU_HW_INFO_TYPE_TEGRA241_CMDQV: NVIDIA Tegra241 CMDQV (extension for ARM\n * SMMUv3) info type\n * @IOMMU_HW_INFO_TYPE_AMD: AMD IOMMU info type\n+ * @IOMMU_HW_INFO_TYPE_RISCV_IOMMU: RISC-V iommu info type\n */\n enum iommu_hw_info_type {\n \tIOMMU_HW_INFO_TYPE_NONE = 0,\n@@ -678,6 +695,7 @@ enum iommu_hw_info_type {\n \tIOMMU_HW_INFO_TYPE_ARM_SMMUV3 = 2,\n \tIOMMU_HW_INFO_TYPE_TEGRA241_CMDQV = 3,\n \tIOMMU_HW_INFO_TYPE_AMD = 4,\n+\tIOMMU_HW_INFO_TYPE_RISCV_IOMMU = 5,\n };\n \n /**\n", "prefixes": [ "RFC", "11/11" ] }