Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2196283/?format=api
{ "id": 2196283, "url": "http://patchwork.ozlabs.org/api/patches/2196283/?format=api", "web_url": "http://patchwork.ozlabs.org/project/kvm-riscv/patch/20260213103557.3207335-4-xujiakai2025@iscas.ac.cn/", "project": { "id": 70, "url": "http://patchwork.ozlabs.org/api/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": "", "list_archive_url": "http://lists.infradead.org/pipermail/kvm-riscv/", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260213103557.3207335-4-xujiakai2025@iscas.ac.cn>", "list_archive_url": null, "date": "2026-02-13T10:35:57", "name": "[v7,3/3] RISC-V: KVM: selftests: Add RISC-V SBI STA shmem alignment tests", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "e8fb2018a363b772e01f3598e36132db4cd57f58", "submitter": { "id": 92543, "url": "http://patchwork.ozlabs.org/api/people/92543/?format=api", "name": "Jiakai Xu", "email": "xujiakai2025@iscas.ac.cn" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/kvm-riscv/patch/20260213103557.3207335-4-xujiakai2025@iscas.ac.cn/mbox/", "series": [ { "id": 492078, "url": "http://patchwork.ozlabs.org/api/series/492078/?format=api", "web_url": "http://patchwork.ozlabs.org/project/kvm-riscv/list/?series=492078", "date": "2026-02-13T10:35:56", "name": "RISC-V: KVM: Validate SBI STA shmem alignment", "version": 7, "mbox": "http://patchwork.ozlabs.org/series/492078/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2196283/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2196283/checks/", "tags": {}, "related": [], "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=AkCBuvEJ;\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 4fC7rs3fBDz1xxM\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 13 Feb 2026 21:37:00 +1100 (AEDT)", "from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1vqqXd-00000003KIn-2Qnl;\n\tFri, 13 Feb 2026 10:36:53 +0000", "from smtp25.cstnet.cn ([159.226.251.25] helo=cstnet.cn)\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1vqqXY-00000003KDy-2zIg;\n\tFri, 13 Feb 2026 10:36:51 +0000", "from fric.. (unknown [210.73.43.101])\n\tby APP-05 (Coremail) with SMTP id zQCowAC3RgqO_o5pQN4uCA--.25463S5;\n\tFri, 13 Feb 2026 18:36:02 +0800 (CST)" ], "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=xHDlGD5IDa7b9rt3+CDbbrOpFnFdUG/+zKOiwK+sUKk=; b=AkCBuvEJQbZOXO\n\tK1Svyiy0JSm2PTP+0+bDXAEXj7E6brqWMEmCwomITMvLr4W8ZxTm6tvlUevz9f0OI51xFMcBqGE3Z\n\tRbIBxd8qw1LH8tHPYsrjgPo1Wp3M3mLnpCfrhhybhacpZBpgI0Xv/ZowPMFcGb++6/wfDkC4tYZeY\n\t+TC/U4hpXD6zEN74BLpVohXHvQW6ZxxD3AivQliUkPm8aL4SuqVReGYOTZ0NCbdz3fPHqOHwo4dpp\n\tLqR7XmtjQG4n0+VAiMj/ubYM90Jc93veU+5FXMWMyBjxkqSP5DiqsyqPrPazMmKouz65YNNrJJPAi\n\teynSSp8/M2jurn0F6f8g==;", "From": "Jiakai Xu <xujiakai2025@iscas.ac.cn>", "To": "linux-kernel@vger.kernel.org,\n\tkvm@vger.kernel.org,\n\tkvm-riscv@lists.infradead.org,\n\tlinux-riscv@lists.infradead.org,\n\tlinux-kselftest@vger.kernel.org", "Cc": "Anup Patel <anup@brainfault.org>,\n\tAtish Patra <atish.patra@linux.dev>,\n\tPaul Walmsley <pjw@kernel.org>,\n\tPalmer Dabbelt <palmer@dabbelt.com>,\n\tAlbert Ou <aou@eecs.berkeley.edu>,\n\tAlexandre Ghiti <alex@ghiti.fr>,\n\tAndrew Jones <ajones@ventanamicro.com>,\n\tPaolo Bonzini <pbonzini@redhat.com>,\n\tShuah Khan <shuah@kernel.org>,\n\tJiakai Xu <xujiakai2025@iscas.ac.cn>,\n\tJiakai Xu <jiakaiPeanut@gmail.com>", "Subject": "[PATCH v7 3/3] RISC-V: KVM: selftests: Add RISC-V SBI STA shmem\n alignment tests", "Date": "Fri, 13 Feb 2026 10:35:57 +0000", "Message-Id": "<20260213103557.3207335-4-xujiakai2025@iscas.ac.cn>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20260213103557.3207335-1-xujiakai2025@iscas.ac.cn>", "References": "<20260213103557.3207335-1-xujiakai2025@iscas.ac.cn>", "MIME-Version": "1.0", "X-CM-TRANSID": "zQCowAC3RgqO_o5pQN4uCA--.25463S5", "X-Coremail-Antispam": "1UD129KBjvJXoWxCr1fKw17CrWDCF4rurWrGrg_yoW5Xr4fpr\n\tZ7Gr90qrW8trs3t34xKr1vqF4FgrWvkr4vvry7Zw4rAF4xtF1xJryUKFyDZ343WrZ5XF1S\n\tvFySqF45uF4DAaDanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2\n\t9KBjDU0xBIdaVrnRJUUUQF14x267AKxVWrJVCq3wAFc2x0x2IEx4CE42xK8VAvwI8IcIk0\n\trVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2048vs2IY020E87I2jVAFwI0_JrWl82xGYIkIc2\n\tx26xkF7I0E14v26ryj6s0DM28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8wA2z4x0\n\tY4vE2Ix0cI8IcVAFwI0_Gr0_Xr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Cr0_Gr1UM2\n\t8EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s0DM2vY\n\tz4IE04k24VAvwVAKI4IrM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c\n\t02F40Ex7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE\n\t4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7M4\n\tIIrI8v6xkF7I0E8cxan2IY04v7MxkF7I0En4kS14v26r1q6r43MxAIw28IcxkI7VAKI48J\n\tMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwV\n\tAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVW8ZVWrXwCIc40Y0x0EwIxGrwCI42IY6xIIjxv2\n\t0xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWxJVW8Jr1lIxAIcVCF04k26c\n\txKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAF\n\twI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x0JUmiifUUUUU=", "X-Originating-IP": "[210.73.43.101]", "X-CM-SenderInfo": "50xmxthndljiysv6x2xfdvhtffof0/1tbiCRARCWmOigf8bQACs4", "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ", "X-CRM114-CacheID": "sfid-20260213_023649_122446_66DB1E20 ", "X-CRM114-Status": "GOOD ( 11.08 )", "X-Spam-Score": "-1.9 (-)", "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: Add RISC-V KVM selftests to verify the SBI Steal-Time\n Accounting\n (STA) shared memory alignment requirements. The SBI specification requires\n the STA shared memory GPA to be 64-byte aligned,\n or set to all-ones to explicitly\n disable steal-time accounting. This test verifies that KVM enforces the\n expected\n behavi [...]\n Content analysis details: (-1.9 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 [159.226.251.25 listed in list.dnswl.org]\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 [159.226.251.25 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 [159.226.251.25 listed in sa-accredit.habeas.com]\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 [159.226.251.25 listed in\n bl.score.senderscore.com]\n -0.0 SPF_HELO_PASS SPF: HELO matches SPF record\n -0.0 SPF_PASS SPF: sender matches SPF record\n -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%\n [score: 0.0000]", "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": "Add RISC-V KVM selftests to verify the SBI Steal-Time Accounting (STA)\nshared memory alignment requirements.\n\nThe SBI specification requires the STA shared memory GPA to be 64-byte\naligned, or set to all-ones to explicitly disable steal-time accounting.\nThis test verifies that KVM enforces the expected behavior when\nconfiguring the SBI STA shared memory via KVM_SET_ONE_REG.\n\nSpecifically, the test checks that:\n- misaligned GPAs are rejected with -EINVAL\n- 64-byte aligned GPAs are accepted\n- all-ones GPA is accepted\n\nSigned-off-by: Jiakai Xu <xujiakai2025@iscas.ac.cn>\nSigned-off-by: Jiakai Xu <jiakaiPeanut@gmail.com>\n---\nV6 -> V7: \n- Removed RISCV_SBI_STA_REG() macro addition and used existing \nKVM_REG_RISCV_SBI_STA_REG(shmem_lo) instead.\n- Refined assertion messages per review feedback.\n- Split into two patches per Andrew Jones' suggestion:\n Refactored UAPI tests from steal_time_init() into dedicated \n check_steal_time_uapi() function and added empty stub for \n RISC-V.\n Filled in RISC-V stub with STA alignment tests. (this patch)\n---\n tools/testing/selftests/kvm/steal_time.c | 26 +++++++++++++++++++++++-\n 1 file changed, 25 insertions(+), 1 deletion(-)", "diff": "diff --git a/tools/testing/selftests/kvm/steal_time.c b/tools/testing/selftests/kvm/steal_time.c\nindex a814f6f3f8b41..2af7fd7513d55 100644\n--- a/tools/testing/selftests/kvm/steal_time.c\n+++ b/tools/testing/selftests/kvm/steal_time.c\n@@ -233,6 +233,7 @@ static void check_steal_time_uapi(struct kvm_vcpu *vcpu)\n \n /* SBI STA shmem must have 64-byte alignment */\n #define STEAL_TIME_SIZE\t\t((sizeof(struct sta_struct) + 63) & ~63)\n+#define INVALID_GPA (~(u64)0)\n \n static vm_paddr_t st_gpa[NR_VCPUS];\n \n@@ -327,7 +328,30 @@ static void steal_time_dump(struct kvm_vm *vm, uint32_t vcpu_idx)\n \n static void check_steal_time_uapi(struct kvm_vcpu *vcpu)\n {\n-\t/* RISC-V UAPI tests will be added in a subsequent patch */\n+\tstruct kvm_one_reg reg;\n+\tuint64_t shmem;\n+\tint ret;\n+\n+\treg.id = KVM_REG_RISCV_SBI_STA_REG(shmem_lo);\n+\treg.addr = (uint64_t)&shmem;\n+\n+\t/* Case 1: misaligned GPA */\n+\tshmem = ST_GPA_BASE + 1;\n+\tret = __vcpu_ioctl(vcpu, KVM_SET_ONE_REG, ®);\n+\tTEST_ASSERT(ret == -1 && errno == EINVAL,\n+\t\t \"misaligned STA shmem returns -EINVAL\");\n+\n+\t/* Case 2: 64-byte aligned GPA */\n+\tshmem = ST_GPA_BASE;\n+\tret = __vcpu_ioctl(vcpu, KVM_SET_ONE_REG, ®);\n+\tTEST_ASSERT(ret == 0,\n+\t\t \"aligned STA shmem succeeds\");\n+\n+\t/* Case 3: INVALID_GPA disables STA */\n+\tshmem = INVALID_GPA;\n+\tret = __vcpu_ioctl(vcpu, KVM_SET_ONE_REG, ®);\n+\tTEST_ASSERT(ret == 0,\n+\t\t \"all-ones for STA shmem succeeds\");\n }\n \n #endif\n", "prefixes": [ "v7", "3/3" ] }