get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2223669,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2223669/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260415233740.3027321-4-alistair.francis@wdc.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": "<20260415233740.3027321-4-alistair.francis@wdc.com>",
    "date": "2026-04-15T23:37:39",
    "name": "[v2,3/4] target/riscv: Don't OR mip.SEIP when mvien is one",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "5571f5b95c4657f92652b33b40a16a349182ca73",
    "submitter": {
        "id": 64571,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/64571/?format=api",
        "name": "Alistair Francis",
        "email": "alistair23@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260415233740.3027321-4-alistair.francis@wdc.com/mbox/",
    "series": [
        {
            "id": 500054,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/500054/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=500054",
            "date": "2026-04-15T23:37:38",
            "name": "target/riscv: A collection of bug fixes",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/500054/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2223669/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2223669/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=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=ECCLwCxJ;\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 4fwyKV1MDFz1yHP\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 16 Apr 2026 09:39:26 +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 1wD9oS-0003AI-E7; Wed, 15 Apr 2026 19:38:28 -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 <alistair23@gmail.com>)\n id 1wD9oL-00039O-Ot\n for qemu-devel@nongnu.org; Wed, 15 Apr 2026 19:38:22 -0400",
            "from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <alistair23@gmail.com>)\n id 1wD9oJ-0003cB-SH\n for qemu-devel@nongnu.org; Wed, 15 Apr 2026 19:38:21 -0400",
            "by mail-pg1-x535.google.com with SMTP id\n 41be03b00d2f7-c796163fac5so513501a12.1\n for <qemu-devel@nongnu.org>; Wed, 15 Apr 2026 16:38:19 -0700 (PDT)",
            "from toolbx.alistair23.me ([2403:581e:fdf9:0:6209:4521:6813:45b7])\n by smtp.gmail.com with ESMTPSA id\n d9443c01a7336-2b47826ea53sm32341675ad.52.2026.04.15.16.38.12\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 15 Apr 2026 16:38:16 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1776296298; x=1776901098; 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=09bnGsDbKTHVT0HRhPjc1Z5jPce1HDUtrYwYOy1p71Y=;\n b=ECCLwCxJDWstUgX1v6/EsqsKZkd0aJ2L4VygSFcDigzIXdBF9By8uPy/3RLAS5tUH0\n xnbXVkUJnXf2x2ykw4PHweKbmRgSE2WWO9A4RtprcXDhPsr6+ozho0ZNJqSGdjGH7Jf1\n KBZ66c3IFckGq2Jj9vQhuqd2whkcXj9Zn0+nCJWLokqNbqwKAtaxYxJYt5TkKrXq3g1z\n yQu4gCGaVumwMlMsEwbcLDRhzKCmvBouNa7yGYcJ5FjJTWwCzMn/V7mgFFeouqql5G6n\n jSxW9+eDTS8EtYJ2fc6sw8GnDRZkqwmUvOMEBjqHVhSwE2l0H9hCtLYtIJHh49jEuHA3\n kiyA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776296298; x=1776901098;\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=09bnGsDbKTHVT0HRhPjc1Z5jPce1HDUtrYwYOy1p71Y=;\n b=ii3K2/zE018uF5I4raI3X8xoDWJIseHKMpWQ7+t8ads3nYceZdqmRRdTeN0nkGOuZY\n HZClD+jIdGGzoBXZHg/YJYjsXHJn2A6ONWjgq0iKOnaYUpdEui+yUP6CAccd8Nxtp2Uy\n 4OdDlXiOAM2Z+54EylrOi908MxTWF3FMkG4HC3HvRhwlUBeHBy656YHghAZjTttfxEgC\n /GbHkSdLEjzlttL57ipMfeJiM9LYMtRJmMw4u9ykzvtZbBJRFVi1bkmR7ijugU/g9JEG\n Zz3NVV6/W+zE765i4w34jOEdg0eWN3CRjYjUAKIn9K+tNWl2GH4Rfmg7I74UmD0uX1Qj\n nKKA==",
        "X-Forwarded-Encrypted": "i=1;\n AFNElJ9CZQypyR70FuNiTpBWl9o4G66BpuThDpChDkuKvXNUJlszM/Jd0hCAwpJXv038yuJb9moMkvcptit2@nongnu.org",
        "X-Gm-Message-State": "AOJu0Yzf5JkEFQywDZgLImgcoQXP1k/qJRxX9VRQshTtI3YMa4FBZ3Tw\n PbW17NyZfY6GNzSG3d/AcgasVJTbWAqq8sz2bYfyRdkQvdp0Q01ictM3",
        "X-Gm-Gg": "AeBDiesXOnIFIC/qfTBZKBDSVNjCSc6G07of5haXaAn6IYONBXRHPyK4mu/2scVYDb0\n o4f7JapcpytIJA9+twMlqxi9GjN5HcM7e9CBh2EbssZlUsAbHWDz2PxrZHCzQVpT8h8+jkMsPv3\n Yq5YCie/yEzAPKMRKHkBKGjD1nV3UsJcZjuDqBSd03osElf329snU1y4ZmCnn3bfSqOHPe1uM4Y\n WoU7mbhR6gw6Geh3CizDJcsgep+3MZZ4nn4odGWuWn3autHgQ8JFZGwfiZ9JmgKVArPaU0s8YkE\n LxPCW5Sm0GqR3dOXYUl2nkzh8YLrgsYGrx/RdtJ0jD/l2W+yJwL4wdIiF9j66aSoNlQ4EmRdy2M\n z4pZaTwGoxJ55777Bw4JaJWcFnNJm/zQ2EU9Whhlf6Yai1reqELznMPKur0BqDPOU+AGpCJ7794\n CxdUchw4Pa1RqBdY36MC8zaE99o7LZdIAWp20ZLwtma5x4Xnoh+O8=",
        "X-Received": "by 2002:a17:902:b193:b0:2ae:c529:a13f with SMTP id\n d9443c01a7336-2b2d5978f2bmr191714575ad.14.1776296297694;\n Wed, 15 Apr 2026 16:38:17 -0700 (PDT)",
        "From": "alistair23@gmail.com",
        "X-Google-Original-From": "alistair.francis@wdc.com",
        "To": "palmer@dabbelt.com, liwei1518@gmail.com, daniel.barboza@oss.qualcomm.com,\n zhiwei_liu@linux.alibaba.com, chao.liu.zevorn@gmail.com,\n qemu-riscv@nongnu.org, qemu-devel@nongnu.org",
        "Cc": "alistair23@gmail.com, Alistair Francis <alistair.francis@wdc.com>,\n qemu-stable@nongnu.org",
        "Subject": "[PATCH v2 3/4] target/riscv: Don't OR mip.SEIP when mvien is one",
        "Date": "Thu, 16 Apr 2026 09:37:39 +1000",
        "Message-ID": "<20260415233740.3027321-4-alistair.francis@wdc.com>",
        "X-Mailer": "git-send-email 2.53.0",
        "In-Reply-To": "<20260415233740.3027321-1-alistair.francis@wdc.com>",
        "References": "<20260415233740.3027321-1-alistair.francis@wdc.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=2607:f8b0:4864:20::535;\n envelope-from=alistair23@gmail.com; helo=mail-pg1-x535.google.com",
        "X-Spam_score_int": "-17",
        "X-Spam_score": "-1.8",
        "X-Spam_bar": "-",
        "X-Spam_report": "(-1.8 / 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 FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001,\n RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=unavailable 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": "From: Alistair Francis <alistair.francis@wdc.com>\n\nThe RISC-V spec states that\n\n\"\"\"\nBut when bit 9 of mvien is one, bit SEIP in mip is read-only and does\nnot include the value of bit 9 of mvip. Rather, the value of mip.SEIP\nis simply the supervisor external interrupt signal from the hart’s\nexternal interrupt controller (APLIC or IMSIC).\n\"\"\"\n\nAs such let's mark the mip.SEIP in rmw_mip64().\n\nCc: qemu-stable@nongnu.org\nResolves: https://gitlab.com/qemu-project/qemu/-/work_items/2828\nSigned-off-by: Alistair Francis <alistair.francis@wdc.com>\n---\nv2:\n - Move the changes to rmw_mip64() instead\n\n target/riscv/csr.c | 8 ++++++++\n 1 file changed, 8 insertions(+)",
    "diff": "diff --git a/target/riscv/csr.c b/target/riscv/csr.c\nindex a75281539b..29dd596ae4 100644\n--- a/target/riscv/csr.c\n+++ b/target/riscv/csr.c\n@@ -3671,6 +3671,14 @@ static RISCVException rmw_mip64(CPURISCVState *env, int csrno,\n     uint64_t old_mip, mask = wr_mask & delegable_ints;\n     uint32_t gin;\n \n+    /*\n+     * When mvien[9]=1, mip.SEIP is read-only and reflects only\n+     * the external interrupt signal from the interrupt controller.\n+     */\n+    if (env->mvien & MIP_SEIP) {\n+        mask &= ~MIP_SEIP;\n+    }\n+\n     if (mask & MIP_SEIP) {\n         env->software_seip = new_val & MIP_SEIP;\n         new_val |= env->external_seip * MIP_SEIP;\n",
    "prefixes": [
        "v2",
        "3/4"
    ]
}