get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2196413/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2196413,
    "url": "http://patchwork.ozlabs.org/api/patches/2196413/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/opensbi/patch/20260213190459.2540597-4-raymondmaoca@gmail.com/",
    "project": {
        "id": 67,
        "url": "http://patchwork.ozlabs.org/api/projects/67/?format=api",
        "name": "OpenSBI development",
        "link_name": "opensbi",
        "list_id": "opensbi.lists.infradead.org",
        "list_email": "opensbi@lists.infradead.org",
        "web_url": "https://github.com/riscv/opensbi",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": "https://github.com/riscv/opensbi/commit/{}"
    },
    "msgid": "<20260213190459.2540597-4-raymondmaoca@gmail.com>",
    "list_archive_url": null,
    "date": "2026-02-13T19:04:59",
    "name": "[RFC,3/3] lib: sbi: Add VIRQ ecall extension",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "ebd10ea20c563451775b8dfd6a20ece1112021c8",
    "submitter": {
        "id": 91989,
        "url": "http://patchwork.ozlabs.org/api/people/91989/?format=api",
        "name": "Raymond Mao",
        "email": "raymondmaoca@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/opensbi/patch/20260213190459.2540597-4-raymondmaoca@gmail.com/mbox/",
    "series": [
        {
            "id": 492133,
            "url": "http://patchwork.ozlabs.org/api/series/492133/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/opensbi/list/?series=492133",
            "date": "2026-02-13T19:04:57",
            "name": "VIRQ (Virtual IRQ) layer to support paravirtual interrupt delivery",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/492133/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2196413/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2196413/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <opensbi-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=UlU4TbTX;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20230601 header.b=HUowjUfN;\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=opensbi-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 4fCM7Z1GKsz1xxc\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 14 Feb 2026 06:05:27 +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 1vqyTa-00000003pE6-43F9;\n\tFri, 13 Feb 2026 19:05:14 +0000",
            "from mail-qv1-xf2c.google.com ([2607:f8b0:4864:20::f2c])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1vqyTY-00000003pDA-3mCG\n\tfor opensbi@lists.infradead.org;\n\tFri, 13 Feb 2026 19:05:14 +0000",
            "by mail-qv1-xf2c.google.com with SMTP id\n 6a1803df08f44-896fa834290so15108016d6.1\n        for <opensbi@lists.infradead.org>;\n Fri, 13 Feb 2026 11:05:12 -0800 (PST)",
            "from ubuntu.localdomain (174-138-202-16.cpe.distributel.net.\n [174.138.202.16])\n        by smtp.gmail.com with ESMTPSA id\n 6a1803df08f44-8971cd8b1bfsm70420096d6.28.2026.02.13.11.05.10\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Fri, 13 Feb 2026 11:05:11 -0800 (PST)"
        ],
        "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=HtFcIZzvOwk+xVvc52k3FivgnIBbRCgo6MpBU5wEjMw=; b=UlU4TbTXtrUJRr\n\tu7EdHVeHcz/7G4deBGCwKbSw9KNsez4zlR009j5BJ1Kc1AmchTmDT8qU0RNKlcsCyIaGkDPlpT4ah\n\tlhfxGcAUTWkwFTo5weKQMZw0r4nPzepu2H+vdsl3W4xLqohYxFawoMG061vy4ZTt9i+rNEe6FXC1O\n\tu7X+NqFxffWiraFH2CJHytLXqHriwAxkJO2TPO5tdyGlbEhSf/LgadS30mNNE2hup+aVbTUvmDUHn\n\tQJeFOGmBdAJcPVP5hC2SEGcCzcFUy91RwBOJ8omMNL0RDYxXxi8LZpZl7sY7bDh946tIPVFDsNBqu\n\tg0ZMzu+CFHmqRzYlY8Fw==;",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20230601; t=1771009511; x=1771614311;\n darn=lists.infradead.org;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=L3UYZ95kq1Y3MqfoWuC80k+tQQfPbg/fuHAikl2vGkQ=;\n        b=HUowjUfNajkDXqW8bCxd2e/LLo4Qn4akha3G35DCMt86Ze33EW7lknQK4lg7rcTwQm\n         HUeksm5mT+m2Ce4aXAysVVg2mcpre4j4mBaCcK1NGhIJQ9TCLHfdhOdSCmpKW31ATT4T\n         g+IpBPKmbKTM4wM+R35rEW8r7GACov2O8U5isurllpduInE1kgkNpYvcDEgbDcbzcIym\n         4nSI41jVt5ngemaX92o6yb01DJHAUR8VPncNAjcO91R0FfQkooJ8nKHM4z/7OfaYJ9ww\n         qUjtVBCS5aUULx8WZke+qsvNCG4aSRo3T/LDohNxQdf6nXF8ywYG+UmJ0Dg30LP+qLr4\n         voxg=="
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20230601; t=1771009511; x=1771614311;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n         :to:cc:subject:date:message-id:reply-to;\n        bh=L3UYZ95kq1Y3MqfoWuC80k+tQQfPbg/fuHAikl2vGkQ=;\n        b=gkEvgKyH6PvYbqHCjYyeSn9nkrMnU4xHss1aYLO4dAquLxSNZzfkKh5bY/cAn7U62e\n         7AUrXsbFDkb1aP5BjjWcwqBlOPVqrnkDlp8UwZfKIC1agDXdqMTeTEfuXqIeb1DgVRd/\n         YFr8rR9ycSaQGoXqJJ8o6tcJDXLmbdDySWVB7TwrygAi5h1qNB/blazECmi2GZvhWKyb\n         3wkTGHxDjEi6i9aT1kWXGmIJ2wc3SS1WgRSLqr7/k/eG5bOpCNt4sLtAmVewvDgKUJBG\n         FqpQu7qROs9x78Ziii20pO/HR9czlFZuotdzc9PBloFm7xHCVwr/L8+71u02Cze+o6f/\n         svWw==",
        "X-Gm-Message-State": "AOJu0YyWEbLWn+0Uqt80WDSgvG96rjqGXWUQuY+1ncdUXEeq0OESncJN\n\tZ85WyzeIhbWTgGgeXgUyAGC2/+TWRh1a0fsManZRRieQx4vQndmd4kRBguotVA==",
        "X-Gm-Gg": "AZuq6aKvsQTuCIUFRbieXS3rLNlc7D+yqbe2nfEBENUTW4yMNMrycHQrAknaVGmHray\n\tXIJcyWe/sErieluq8Rp5VYjxRx+SYTPS9nH/Ldvgvvy7ig/Qmi32SsKTpyEUTTGOmcLOQvDxgyI\n\tchxZp8msMrwtk+7ECqNDACo/4uQQNjIcrHwVFgji8rlYgZxpOZ9SXEkCfqelgza2/RzHdNt+Ywa\n\tOR3AuiTQVkPlyRWen4w+iAid0W28TqJq8p2ERdSNhg1aZj5a6Epz2InWyHWXBNN/Qf8C5AyOswd\n\tUIrMYxw8OyzUPtYzHuu+Zwa+GvdMSMstTgQM01k/oOoV3tiGKAbfz4q8yGH8c46xO1GtzXlR/hC\n\tkpM6NjchE1tzkCIpQ4Elm02r4A68unH0pJXlvGbvFzwh/invWd46oqL27GVoJd3+pbYcEZyJlcg\n\tQpbCuS95xIE6mXE7WE9LwnnQtZOrwhbRFPI9y2LmvAgZr8SjntQ51GUbJ/PPGjzDgIM53coCPWT\n\tWaY7O8Dp8A=",
        "X-Received": "by 2002:a05:6214:21eb:b0:896:f42f:bf15 with SMTP id\n 6a1803df08f44-8973f293d30mr18944086d6.10.1771009511360;\n        Fri, 13 Feb 2026 11:05:11 -0800 (PST)",
        "From": "Raymond Mao <raymondmaoca@gmail.com>",
        "To": "opensbi@lists.infradead.org",
        "Cc": "scott@riscstar.com,\n\tdave.patel@riscstar.com,\n\traymond.mao@riscstar.com,\n\trobin.randhawa@sifive.com,\n\tsamuel.holland@sifive.com,\n\tanup.patel@qti.qualcomm.com,\n\tanuppate@qti.qualcomm.com,\n\tdhaval@rivosinc.com,\n\tpeter.lin@sifive.com",
        "Subject": "[PATCH RFC 3/3] lib: sbi: Add VIRQ ecall extension",
        "Date": "Fri, 13 Feb 2026 14:04:59 -0500",
        "Message-Id": "<20260213190459.2540597-4-raymondmaoca@gmail.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20260213190459.2540597-1-raymondmaoca@gmail.com>",
        "References": "<20260213190459.2540597-1-raymondmaoca@gmail.com>",
        "MIME-Version": "1.0",
        "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ",
        "X-CRM114-CacheID": "sfid-20260213_110512_955371_332FA42F ",
        "X-CRM114-Status": "GOOD (  15.04  )",
        "X-Spam-Score": "-2.1 (--)",
        "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: Raymond Mao Add vendor SBI extension ecall for VIRQ.\n    This allows S-mode payload to pop/complete the next pending VIRQ has\n couried\n    into the current domain. Signed-off-by: Raymond Mao ---\n include/sbi/sbi_ecall_interface.h\n    | 18 ++++++++++ lib/sbi/Kconfig | 5 +++ lib/sbi/objects.mk | 3 ++\n lib/sbi/sbi_ecall_virq.c\n    | 57 +++++++++++++++++++++++++++++++ 4 fil [...]\n Content analysis details:   (-2.1 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                             [2607:f8b0:4864:20:0:0:0:f2c listed in]\n                             [list.dnswl.org]\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 -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  0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n not necessarily valid\n -0.1 DKIM_VALID_EF          Message has a valid DKIM or DK signature from\n                             envelope-from domain\n -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n                             [score: 0.0000]\n  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail\n provider\n                             [raymondmaoca(at)gmail.com]",
        "X-BeenThere": "opensbi@lists.infradead.org",
        "X-Mailman-Version": "2.1.34",
        "Precedence": "list",
        "List-Id": "<opensbi.lists.infradead.org>",
        "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/opensbi>,\n <mailto:opensbi-request@lists.infradead.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.infradead.org/pipermail/opensbi/>",
        "List-Post": "<mailto:opensbi@lists.infradead.org>",
        "List-Help": "<mailto:opensbi-request@lists.infradead.org?subject=help>",
        "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/opensbi>,\n <mailto:opensbi-request@lists.infradead.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Sender": "\"opensbi\" <opensbi-bounces@lists.infradead.org>",
        "Errors-To": "opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"
    },
    "content": "From: Raymond Mao <raymond.mao@riscstar.com>\n\nAdd vendor SBI extension ecall for VIRQ.\nThis allows S-mode payload to pop/complete the next pending VIRQ has\ncouried into the current domain.\n\nSigned-off-by: Raymond Mao <raymond.mao@riscstar.com>\n---\n include/sbi/sbi_ecall_interface.h | 18 ++++++++++\n lib/sbi/Kconfig                   |  5 +++\n lib/sbi/objects.mk                |  3 ++\n lib/sbi/sbi_ecall_virq.c          | 57 +++++++++++++++++++++++++++++++\n 4 files changed, 83 insertions(+)\n create mode 100644 lib/sbi/sbi_ecall_virq.c",
    "diff": "diff --git a/include/sbi/sbi_ecall_interface.h b/include/sbi/sbi_ecall_interface.h\nindex 76624e3f..9cb9a7eb 100644\n--- a/include/sbi/sbi_ecall_interface.h\n+++ b/include/sbi/sbi_ecall_interface.h\n@@ -126,6 +126,24 @@\n #define SBI_EXT_FWFT_SET\t\t0x0\n #define SBI_EXT_FWFT_GET\t\t0x1\n \n+#ifdef CONFIG_SBI_ECALL_VIRQ\n+\n+/* Vendor extension base range is defined by the SBI spec. Choose a private ID. */\n+#define SBI_EXT_VIRQ\t\t\t0x0900524d\n+\n+/* Function IDs for SBI_EXT_VIRQ */\n+#define SBI_EXT_VIRQ_POP\t\t0\n+#define SBI_EXT_VIRQ_COMPLETE\t\t1\n+\n+/*\n+ * SBI_EXT_VIRQ_POP\n+ * Returns:\n+ *   a0: SBI error code (0 for success)\n+ *   a1: next pending hwirq (0 if none pending)\n+ */\n+\n+#endif\n+\n enum sbi_fwft_feature_t {\n \tSBI_FWFT_MISALIGNED_EXC_DELEG\t\t= 0x0,\n \tSBI_FWFT_LANDING_PAD\t\t\t= 0x1,\ndiff --git a/lib/sbi/Kconfig b/lib/sbi/Kconfig\nindex c6cc04bc..8479f861 100644\n--- a/lib/sbi/Kconfig\n+++ b/lib/sbi/Kconfig\n@@ -69,4 +69,9 @@ config SBI_ECALL_SSE\n config SBI_ECALL_MPXY\n \tbool \"MPXY extension\"\n \tdefault y\n+\n+config SBI_ECALL_VIRQ\n+\tbool \"VIRQ extension\"\n+\tdefault y\n+\n endmenu\ndiff --git a/lib/sbi/objects.mk b/lib/sbi/objects.mk\nindex 07d13229..18e590ab 100644\n--- a/lib/sbi/objects.mk\n+++ b/lib/sbi/objects.mk\n@@ -64,6 +64,9 @@ libsbi-objs-$(CONFIG_SBI_ECALL_SSE) += sbi_ecall_sse.o\n carray-sbi_ecall_exts-$(CONFIG_SBI_ECALL_MPXY) += ecall_mpxy\n libsbi-objs-$(CONFIG_SBI_ECALL_MPXY) += sbi_ecall_mpxy.o\n \n+carray-sbi_ecall_exts-$(CONFIG_SBI_ECALL_VIRQ) += ecall_virq\n+libsbi-objs-$(CONFIG_SBI_ECALL_VIRQ) += sbi_ecall_virq.o\n+\n libsbi-objs-y += sbi_bitmap.o\n libsbi-objs-y += sbi_bitops.o\n libsbi-objs-y += sbi_console.o\ndiff --git a/lib/sbi/sbi_ecall_virq.c b/lib/sbi/sbi_ecall_virq.c\nnew file mode 100644\nindex 00000000..b192598e\n--- /dev/null\n+++ b/lib/sbi/sbi_ecall_virq.c\n@@ -0,0 +1,57 @@\n+/*\n+ * SPDX-License-Identifier: BSD-2-Clause\n+ *\n+ * Copyright (c) 2026 RISCstar Solutions.\n+ *\n+ * Author: Raymond Mao <raymond.mao@riscstar.com>\n+ */\n+\n+#include <sbi/sbi_console.h>\n+#include <sbi/sbi_ecall.h>\n+#include <sbi/sbi_ecall_interface.h>\n+#include <sbi/sbi_error.h>\n+#include <sbi/sbi_trap.h>\n+#include <sbi/sbi_virq.h>\n+\n+static int sbi_ecall_virq_handler(unsigned long extid,\n+\t\t\t\t  unsigned long funcid,\n+\t\t\t\t  struct sbi_trap_regs *regs,\n+\t\t\t\t  struct sbi_ecall_return *out)\n+{\n+\t(void)extid;\n+\n+\tsbi_printf(\"[ECALL VIRQ] VIRQ ecall handler, funcid: %ld\\n\", funcid);\n+\n+\tswitch (funcid) {\n+\tcase SBI_EXT_VIRQ_POP:\n+\t\tout->value = (unsigned long)sbi_virq_pop_thishart();\n+\t\treturn SBI_OK;\n+\tcase SBI_EXT_VIRQ_COMPLETE:\n+\t\tu32 hwirq = (u32)regs->a0;\n+\n+\t\tsbi_virq_complete_thishart(hwirq);\n+\t\tregs->a0 = 0;\n+\t\treturn SBI_OK;\n+\tdefault:\n+\t\treturn SBI_ENOTSUPP;\n+\t}\n+}\n+\n+struct sbi_ecall_extension ecall_virq;\n+\n+static int sbi_ecall_virq_register_extensions(void)\n+{\n+\tint ret;\n+\n+\tret = sbi_ecall_register_extension(&ecall_virq);\n+\tsbi_printf(\"[ECALL VIRQ] register VIRQ ecall extensions, ret=%d\\n\", ret);\n+\treturn ret;\n+}\n+\n+struct sbi_ecall_extension ecall_virq = {\n+\t.name        = \"virq\",\n+\t.extid_start = SBI_EXT_VIRQ,\n+\t.extid_end   = SBI_EXT_VIRQ,\n+\t.register_extensions    = sbi_ecall_virq_register_extensions,\n+\t.handle      = sbi_ecall_virq_handler,\n+};\n",
    "prefixes": [
        "RFC",
        "3/3"
    ]
}