get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2229693,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2229693/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260428160103.3551125-4-jim.shu@sifive.com/",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/1.1/projects/14/?format=api",
        "name": "QEMU Development",
        "link_name": "qemu-devel",
        "list_id": "qemu-devel.nongnu.org",
        "list_email": "qemu-devel@nongnu.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20260428160103.3551125-4-jim.shu@sifive.com>",
    "date": "2026-04-28T16:01:02",
    "name": "[3/4] hw/intc: riscv_imsic: Add reset API to IMSIC",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "6050aadf3d74e4a9f66c77600533cbe870e54ece",
    "submitter": {
        "id": 83153,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/83153/?format=api",
        "name": "Jim Shu",
        "email": "jim.shu@sifive.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260428160103.3551125-4-jim.shu@sifive.com/mbox/",
    "series": [
        {
            "id": 501889,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/501889/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=501889",
            "date": "2026-04-28T16:01:00",
            "name": "Minor fixes and enhancements of RISC-V AIA devices",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/501889/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2229693/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2229693/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.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 unprotected) header.d=sifive.com header.i=@sifive.com header.a=rsa-sha256\n header.s=google header.b=DO/m0Oqe;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g4lcH2f8rz1xvV\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 29 Apr 2026 02:04:15 +1000 (AEST)",
            "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wHkuW-00044G-6g; Tue, 28 Apr 2026 12:03:44 -0400",
            "from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <jim.shu@sifive.com>)\n id 1wHksO-00036D-Mi\n for qemu-devel@nongnu.org; Tue, 28 Apr 2026 12:01:39 -0400",
            "from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <jim.shu@sifive.com>)\n id 1wHksM-0003jZ-7l\n for qemu-devel@nongnu.org; Tue, 28 Apr 2026 12:01:31 -0400",
            "by mail-pf1-x434.google.com with SMTP id\n d2e1a72fcca58-8318293f02bso2334254b3a.0\n for <qemu-devel@nongnu.org>; Tue, 28 Apr 2026 09:01:29 -0700 (PDT)",
            "from hsinchu26.internal.sifive.com ([210.176.154.34])\n by smtp.gmail.com with ESMTPSA id\n d2e1a72fcca58-834daf30fbfsm3002331b3a.33.2026.04.28.09.01.25\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 28 Apr 2026 09:01:27 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=sifive.com; s=google; t=1777392088; x=1777996888; darn=nongnu.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=I+5wI6eYi21zzKtm0yWLn4MFkpmieEFORcN4wGstIFM=;\n b=DO/m0OqeXmLVKqMWXYHez9XSrtYh9vhHgepThO0dtd/2ixAGAUWlmoP3XMHXmis/s+\n MWJfunJMK3ohRA+4uCuDsiJ+YifojJE/J9hqt1CbXP/2TDVTrzxX7owhVgFAnc0+pbL8\n uVhT4Dwcu/WW3DU9YV9wFNDI+a/aEzvBQiG43iXNhrntrrjTC7NzZckiWqHgeSdn6wxK\n 0oAgXl4omAnjWuhPY5xrODxFe3GeJhzHlR0GRz1UgynBNTGXJWtSi76FvHdhn8eXCYgC\n 92QtYw1uFQMijAaXtcXpADDtcs9VwXYRtObuu97zczPk+VlpCVPupTiRFxSXbOs469th\n RY/A==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777392088; x=1777996888;\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=I+5wI6eYi21zzKtm0yWLn4MFkpmieEFORcN4wGstIFM=;\n b=cJthgHlBhv9sOLAJ/e1A21NFaRT9J/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mzJ2dXtyINPSSIn/5F4o+DHi5wTEVMmQPhDZFO5yw9y2YafFuc/E00B8Cg==",
        "X-Received": "by 2002:a05:6a00:80a:b0:7e8:3fcb:9b03 with SMTP id\n d2e1a72fcca58-834dcdaf080mr3424973b3a.25.1777392088000;\n Tue, 28 Apr 2026 09:01:28 -0700 (PDT)",
        "From": "Jim Shu <jim.shu@sifive.com>",
        "To": "qemu-devel@nongnu.org,\n\tqemu-riscv@nongnu.org",
        "Cc": "Palmer Dabbelt <palmer@dabbelt.com>,\n Alistair Francis <alistair.francis@wdc.com>,\n Weiwei Li <liwei1518@gmail.com>,\n Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>,\n Liu Zhiwei <zhiwei_liu@linux.alibaba.com>,\n Chao Liu <chao.liu.zevorn@gmail.com>, Jim Shu <jim.shu@sifive.com>",
        "Subject": "[PATCH 3/4] hw/intc: riscv_imsic: Add reset API to IMSIC",
        "Date": "Wed, 29 Apr 2026 00:01:02 +0800",
        "Message-ID": "<20260428160103.3551125-4-jim.shu@sifive.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20260428160103.3551125-1-jim.shu@sifive.com>",
        "References": "<20260428160103.3551125-1-jim.shu@sifive.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=2607:f8b0:4864:20::434;\n envelope-from=jim.shu@sifive.com; helo=mail-pf1-x434.google.com",
        "X-Spam_score_int": "-20",
        "X-Spam_score": "-2.1",
        "X-Spam_bar": "--",
        "X-Spam_report": "(-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=ham autolearn_force=no",
        "X-Spam_action": "no action",
        "X-BeenThere": "qemu-devel@nongnu.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "qemu development <qemu-devel.nongnu.org>",
        "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>",
        "List-Post": "<mailto:qemu-devel@nongnu.org>",
        "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>",
        "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>",
        "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org",
        "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"
    },
    "content": "Clearing IMSIC registers and qemu_irq in the reset function\n\nSigned-off-by: Jim Shu <jim.shu@sifive.com>\n---\n hw/intc/riscv_imsic.c | 19 +++++++++++++++++++\n 1 file changed, 19 insertions(+)",
    "diff": "diff --git a/hw/intc/riscv_imsic.c b/hw/intc/riscv_imsic.c\nindex 7c9a0120335..ac59496c22b 100644\n--- a/hw/intc/riscv_imsic.c\n+++ b/hw/intc/riscv_imsic.c\n@@ -342,6 +342,23 @@ static const MemoryRegionOps riscv_imsic_ops = {\n     }\n };\n \n+static void riscv_imsic_reset_enter(Object *obj, ResetType type)\n+{\n+    RISCVIMSICState *imsic = RISCV_IMSIC(obj);\n+    int i;\n+\n+    memset(imsic->eidelivery, 0, sizeof(uint32_t) * imsic->num_pages);\n+    memset(imsic->eithreshold, 0, sizeof(uint32_t) * imsic->num_pages);\n+\n+    for (i = 0; i < imsic->num_eistate; i++) {\n+        imsic->eistate[i] &= ~IMSIC_EISTATE_ENABLED;\n+    }\n+\n+    for (i = 0; i < imsic->num_pages; i++) {\n+        qemu_irq_lower(imsic->external_irqs[i]);\n+    }\n+}\n+\n static void riscv_imsic_realize(DeviceState *dev, Error **errp)\n {\n     RISCVIMSICState *imsic = RISCV_IMSIC(dev);\n@@ -425,9 +442,11 @@ static const VMStateDescription vmstate_riscv_imsic = {\n static void riscv_imsic_class_init(ObjectClass *klass, const void *data)\n {\n     DeviceClass *dc = DEVICE_CLASS(klass);\n+    ResettableClass *rc = RESETTABLE_CLASS(klass);\n \n     device_class_set_props(dc, riscv_imsic_properties);\n     dc->realize = riscv_imsic_realize;\n+    rc->phases.enter = riscv_imsic_reset_enter;\n     dc->vmsd = &vmstate_riscv_imsic;\n }\n \n",
    "prefixes": [
        "3/4"
    ]
}