Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2222242/?format=api
{ "id": 2222242, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2222242/?format=api", "web_url": "http://patchwork.ozlabs.org/project/kvm-riscv/patch/20260411022223.91029-3-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": "<20260411022223.91029-3-fangyu.yu@linux.alibaba.com>", "date": "2026-04-11T02:22:23", "name": "[2/2] iommupt: Encode IOMMU_MMIO/IOMMU_CACHE via RISC-V Svpbmt bits", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "8fe05d678ce7b412aec2d119c8ce2f66dff905b2", "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/20260411022223.91029-3-fangyu.yu@linux.alibaba.com/mbox/", "series": [ { "id": 499521, "url": "http://patchwork.ozlabs.org/api/1.1/series/499521/?format=api", "web_url": "http://patchwork.ozlabs.org/project/kvm-riscv/list/?series=499521", "date": "2026-04-11T02:22:21", "name": "iommu/riscv: Support Svpbmt memory types in generic_pt", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/499521/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2222242/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2222242/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=MEuSWVbr;\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=fd4cLX6e;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=temperror (SPF Temporary Error: DNS Timeout)\n smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133;\n 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 4fsyBl2dZ3z1yH2\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 11 Apr 2026 12:22:50 +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 1wBNzf-0000000D3AV-1VWE;\n\tSat, 11 Apr 2026 02:22: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 1wBNzc-0000000D39A-0268;\n\tSat, 11 Apr 2026 02:22:41 +0000", "from localhost.localdomain(mailfrom:fangyu.yu@linux.alibaba.com\n fp:SMTPD_---0X0miYSJ_1775874149 cluster:ay36)\n by smtp.aliyun-inc.com;\n Sat, 11 Apr 2026 10:22:30 +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=MKS1fefWDOPNa1Bi6L4GzN6EARIwokt3XiSPAbw8Kiw=; b=MEuSWVbrm2eb5X\n\ty9LsvZKDiP4PGh8E+hafN+UAFb69gaIShw3IBnG07IYa1AlIQFZm/h0O7mFZ1sNidw10RCWi4UXIM\n\tRiLxUur4prx6IimpY6Op4EZMYK635Vt+WzVmNhDGe8RbTJUY3eIgiTK2x8p4+OBX+KgwCXmJT9kGr\n\t3aCXrSosmsMu5CZADEHaFDJ1etApT0t4QjaX8V9vEFOuCmgCrjHZ2WOvbGcmF7EpIO2CNrfYCM06e\n\t80kaBKhngQiEKcwkRxZRGBXnbFRUBIuQd57YKdcWxFpWXYGUTwhryLEkTENo3jxZazSzRDeQ8jugt\n\t2ol0z3a38s/AXXbT1Qog==;", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linux.alibaba.com; s=default;\n\tt=1775874153; h=From:To:Subject:Date:Message-Id:MIME-Version;\n\tbh=OH5/TUCPHpy8sy8haBbJAQ5yBUA8WaHxyR6Sehfd16w=;\n\tb=fd4cLX6eQo1Mu7wU3IhRBL6ce+V2vurHNT18xxk1VmUestbEbJSX98DKKwFrd81R1DBDGp6BVF8hd+QQUIaS+4v6zwvjtN9EFwaObwVpRUepfj2ZPyKW/mv/yYYGm4WEjuUqA4lIrTbbira5UJpAYsK30UQSoApivbHI9RguXq4=" ], "X-Alimail-AntiSpam": "\n AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033045133197;MF=fangyu.yu@linux.alibaba.com;NM=1;PH=DS;RN=18;SR=0;TI=SMTPD_---0X0miYSJ_1775874149;", "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", "Cc": "guoren@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\tFangyu Yu <fangyu.yu@linux.alibaba.com>", "Subject": "[PATCH 2/2] iommupt: Encode IOMMU_MMIO/IOMMU_CACHE via RISC-V Svpbmt\n bits", "Date": "Sat, 11 Apr 2026 10:22:23 +0800", "Message-Id": "<20260411022223.91029-3-fangyu.yu@linux.alibaba.com>", "X-Mailer": "git-send-email 2.39.3 (Apple Git-146)", "In-Reply-To": "<20260411022223.91029-1-fangyu.yu@linux.alibaba.com>", "References": "<20260411022223.91029-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-20260410_192240_424921_7D3D595E ", "X-CRM114-Status": "UNSURE ( 6.18 )", "X-CRM114-Notice": "Please train this message.", "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: Fangyu Yu <fangyu.yu@linux.alibaba.com> When the\n RISC-V\n IOMMU page table format support Svpbmt,\n PBMT provides a way to tag mappings\n with page-based memory types. Encode memory type via PBMT in RISC-V IOMMU\n PTEs:\n Content analysis details: (-17.6 points, 5.0 required)\n pts rule name description\n ---- ----------------------\n --------------------------------------------------\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 -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.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_AU Message has a valid DKIM or DK signature from\n author's\n domain\n -0.1 DKIM_VALID Message has at least one valid DKIM or DK\n signature\n -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%\n [score: 0.0000]\n 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The\n query to Validity was blocked. See\n https://knowledge.validity.com/hc/en-us/articles/20961730681243\n for more information.\n [115.124.30.100 listed in\n sa-trusted.bondedsender.org]\n 0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to\n Validity was blocked. See\n https://knowledge.validity.com/hc/en-us/articles/20961730681243\n for more information.\n [115.124.30.100 listed in sa-accredit.habeas.com]\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 -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\n 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to\n Validity was blocked. See\n https://knowledge.validity.com/hc/en-us/articles/20961730681243\n for more information.\n [115.124.30.100 listed in\n bl.score.senderscore.com]", "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: Fangyu Yu <fangyu.yu@linux.alibaba.com>\n\nWhen the RISC-V IOMMU page table format support Svpbmt, PBMT provides\na way to tag mappings with page-based memory types. Encode memory type\nvia PBMT in RISC-V IOMMU PTEs:\n\n - IOMMU_MMIO -> PBMT=IO\n - !IOMMU_CACHE -> PBMT=NC\n - otherwise -> PBMT=Normal (PBMT=0)\n\nClear the PBMT field before applying the selected encoding, and only\ntouch PBMT when PT_FEAT_RISCV_SVPBMT is advertised.\n\nSigned-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com>\n---\n drivers/iommu/generic_pt/fmt/riscv.h | 9 +++++++++\n 1 file changed, 9 insertions(+)", "diff": "diff --git a/drivers/iommu/generic_pt/fmt/riscv.h b/drivers/iommu/generic_pt/fmt/riscv.h\nindex a7fef6266a36..02051bb3c6e5 100644\n--- a/drivers/iommu/generic_pt/fmt/riscv.h\n+++ b/drivers/iommu/generic_pt/fmt/riscv.h\n@@ -58,6 +58,8 @@ enum {\n \tRISCVPT_G = BIT(5),\n \tRISCVPT_A = BIT(6),\n \tRISCVPT_D = BIT(7),\n+\tRISCVPT_NC = BIT(61),\n+\tRISCVPT_IO = BIT(62),\n \tRISCVPT_RSW = GENMASK(9, 8),\n \tRISCVPT_PPN32 = GENMASK(31, 10),\n \n@@ -237,6 +239,13 @@ static inline int riscvpt_iommu_set_prot(struct pt_common *common,\n \t\tpte |= RISCVPT_R;\n \tif (!(iommu_prot & IOMMU_NOEXEC))\n \t\tpte |= RISCVPT_X;\n+\tif (common->features & BIT(PT_FEAT_RISCV_SVPBMT)) {\n+\t\tpte &= ~RISCVPT_PBMT;\n+\t\tif (iommu_prot & IOMMU_MMIO)\n+\t\t\tpte |= RISCVPT_IO;\n+\t\telse if (!(iommu_prot & IOMMU_CACHE))\n+\t\t\tpte |= RISCVPT_NC;\n+\t}\n \n \t/* Caller must specify a supported combination of flags */\n \tif (unlikely((pte & (RISCVPT_X | RISCVPT_W | RISCVPT_R)) == 0))\n", "prefixes": [ "2/2" ] }