get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2228674,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2228674/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260427080738.77138-12-philmd@linaro.org/",
    "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": "<20260427080738.77138-12-philmd@linaro.org>",
    "date": "2026-04-27T08:07:17",
    "name": "[v4,11/32] monitor: Introduce HMPCommand::arch_bitmask field",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "9ebd7a276871bd321e45561f80a2f478fa2cda6c",
    "submitter": {
        "id": 85046,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/85046/?format=api",
        "name": "Philippe Mathieu-Daudé",
        "email": "philmd@linaro.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260427080738.77138-12-philmd@linaro.org/mbox/",
    "series": [
        {
            "id": 501599,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/501599/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=501599",
            "date": "2026-04-27T08:07:06",
            "name": "monitor: Remove need of per-target handlers",
            "version": 4,
            "mbox": "http://patchwork.ozlabs.org/series/501599/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2228674/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2228674/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=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=uIoHhn+V;\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 4g3x7V6qGrz1yHv\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 27 Apr 2026 18:09:58 +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 1wHH20-0001rd-Ln; Mon, 27 Apr 2026 04:09: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 <philmd@linaro.org>) id 1wHH1e-0001GK-Sx\n for qemu-devel@nongnu.org; Mon, 27 Apr 2026 04:09:10 -0400",
            "from mail-wm1-x334.google.com ([2a00:1450:4864:20::334])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1wHH1c-0001pO-2R\n for qemu-devel@nongnu.org; Mon, 27 Apr 2026 04:09:05 -0400",
            "by mail-wm1-x334.google.com with SMTP id\n 5b1f17b1804b1-488ff90d6c7so84331895e9.2\n for <qemu-devel@nongnu.org>; Mon, 27 Apr 2026 01:09:01 -0700 (PDT)",
            "from localhost.localdomain (88-187-86-199.subs.proxad.net.\n [88.187.86.199]) by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-488fc1c773fsm858727835e9.12.2026.04.27.01.08.56\n (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);\n Mon, 27 Apr 2026 01:08:56 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1777277340; x=1777882140; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:to:from:from:to:cc:subject:date:message-id\n :reply-to; bh=1bo5Y+UZCJy4gHCz2x1tdhwNQXL4/DMiX/PocQwagYM=;\n b=uIoHhn+VBCk5qT2LA4uhOEj2ZzjKNT2LxZnXoTuDMsMrnSGagsM8eFwdOxKeS+bgEI\n vMS5yCRJK3e+Uz5whDqXaroWFS8HQpuHojO43z5BgZrrMkyUHqIUqZhi9srwaoSaegN9\n foLBdX8C1An7z1DVTrChygeCQilz3PSsR0GsFYhMZHOQVmfjEdR6NPZo3B1JDobBv72j\n NDEqItw3aMI12mchfJqNxtT7pVev9CLHpgPYXBc5y/Wz27o9KXffEWTIR25EW2MaOe3v\n hOghjIS/KthyZn57uDgU9oBnpjMFXVVYpPy+UgZqVrsg91R7SrH06CJ4T2Hq9Kd5hwxX\n ABqw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777277340; x=1777882140;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to\n :cc:subject:date:message-id:reply-to;\n bh=1bo5Y+UZCJy4gHCz2x1tdhwNQXL4/DMiX/PocQwagYM=;\n b=WLC4IhtkO/J92YLLK/h0mxeCH9yOy45Az0ncdfCSBPjQej29QBb2CxzNN8bDjglZ0h\n 5hlWwCNcx6agNApIw3UAKFpyJtrfbNy+7kMhtkYMN42mI9exxjPYSjgPNpEQr6TD0Sl9\n 9egXnHrCwoGjZ5atxtuxO17iA0cW7J4Xm0Z3s8kFdDN/75kK+oTXIJeqMpwnYHgamqV1\n uBafYemDInicea/Aj91IhXYhBtN2C7jSDTm/vG/eJrjxBSdB3yYAKuBVIqpLQEyLP1w8\n 9jzfkl+FWxl4J8MiI9QygjJi0qXYt4uK9C3QISR2s/nCGDoXZ60mG/A/L17GtgDzN1pF\n xJJg==",
        "X-Forwarded-Encrypted": "i=1;\n AFNElJ+gV7zejVF4rEViZGWPF+ciL+7FaXuB8l0BPTsYwU1t3pQr3ZEnvAReBBkGO2WaHmT2d83IiBAmrzGN@nongnu.org",
        "X-Gm-Message-State": "AOJu0YxbSxHl4romJgGA1KnN0cS32KWcvw9GLElBSFoq3DV61E2YYXeB\n nmFla59MksTlFc0s6n7XcTaEw/cjIiFe7RMbWfWc3VMpwSXuQ/M7Im7E/WsDHBDK9lQ=",
        "X-Gm-Gg": "AeBDieu00ex0obK65Igulj55ep55Tc7g7HhGTo7GjwkvakxhAyRjhKziYSKRKb+Dxy6\n nLzhbOvc7twW+OFsKrdW9KgylIYdDIP8nWafnapM3UYwzidwtvno47VOV9b72kkF0Jmxf//T1Hc\n wUlLV268UutULnnvi+0pyX7FftKwU0TOQONPRCVJhCOgfkSkGYZHVnxB+l+9Xolaff/5q7j7KL6\n hseYMJwfi9ioFXoX+wjDV5tavNL4dVv3fbroJ4j9YcewGtBcGynTqxSxkYau8D8ROf0PNDcBBZ4\n iBiaTUfFJDIjrMTMNI36YXKA+JgwzcvOJ/7LQhVMvsgaREqE2E5hcTdjMmK6bftQRKJQFIl/ksO\n ZPuLrv/wiKY9rPecNLkyvX1kzJaWAdE2fhT1NqNFy1h99F3spNr3n2HjKLBAbo59SJbnfbdt8AH\n q+qSBB8F7TQH5WY18bkVDY0TAnGqCVB3zfxefL1JaKG2/q5zspapFGbQ03gadQu2eI+kff+V1YU\n J0aob62XTU=",
        "X-Received": "by 2002:a05:600c:46cb:b0:488:ac01:72de with SMTP id\n 5b1f17b1804b1-488fb7451e4mr611543445e9.5.1777277336726;\n Mon, 27 Apr 2026 01:08:56 -0700 (PDT)",
        "From": "=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>",
        "To": "Markus Armbruster <armbru@redhat.com>,\n\tqemu-devel@nongnu.org",
        "Subject": "[PATCH v4 11/32] monitor: Introduce HMPCommand::arch_bitmask field",
        "Date": "Mon, 27 Apr 2026 10:07:17 +0200",
        "Message-ID": "<20260427080738.77138-12-philmd@linaro.org>",
        "X-Mailer": "git-send-email 2.53.0",
        "In-Reply-To": "<20260427080738.77138-1-philmd@linaro.org>",
        "References": "<20260427080738.77138-1-philmd@linaro.org>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=2a00:1450:4864:20::334;\n envelope-from=philmd@linaro.org; helo=mail-wm1-x334.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": "Add the @arch_bitmask field to the HMPCommand structure,\nallowing to restrict a command to a set of target\narchitectures (represented by the QEMU_ARCH_* enum constants).\n\nSigned-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>\nReviewed-by: Richard Henderson <richard.henderson@linaro.org>\n---\n monitor/monitor-internal.h | 11 ++++++++++-\n monitor/hmp-target.c       |  1 +\n monitor/hmp.c              |  4 ++++\n 3 files changed, 15 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/monitor/monitor-internal.h b/monitor/monitor-internal.h\nindex 80b4a8150bf..eaf9a607783 100644\n--- a/monitor/monitor-internal.h\n+++ b/monitor/monitor-internal.h\n@@ -82,7 +82,6 @@ typedef struct HMPCommand {\n      * the formatted text.\n      */\n     HumanReadableText *(*cmd_info_hrt)(Error **errp);\n-    bool coroutine;\n     /*\n      * @sub_table is a list of 2nd level of commands. If it does not exist,\n      * cmd should be used. If it exists, sub_table[?].cmd should be\n@@ -90,6 +89,16 @@ typedef struct HMPCommand {\n      */\n     struct HMPCommand *sub_table;\n     void (*command_completion)(ReadLineState *rs, int nb_args, const char *str);\n+\n+    /* Keep non-pointer data at the end to minimize holes. */\n+\n+    /**\n+     * @arch_bitmask: bitmask of QEMU_ARCH_* constants\n+     *     Allow to restrict the command for a particular set of\n+     *     target architectures.\n+     */\n+    uint32_t arch_bitmask;\n+    bool coroutine;\n } HMPCommand;\n \n struct Monitor {\ndiff --git a/monitor/hmp-target.c b/monitor/hmp-target.c\nindex da7dd7f31f2..f6dce326cf5 100644\n--- a/monitor/hmp-target.c\n+++ b/monitor/hmp-target.c\n@@ -23,6 +23,7 @@\n  */\n \n #include \"qemu/osdep.h\"\n+#include \"qemu/base-arch-defs.h\"\n #include \"monitor-internal.h\"\n #include \"monitor/qdev.h\"\n #include \"net/slirp.h\"\ndiff --git a/monitor/hmp.c b/monitor/hmp.c\nindex 0e5913fabb1..e881c26c305 100644\n--- a/monitor/hmp.c\n+++ b/monitor/hmp.c\n@@ -36,6 +36,7 @@\n #include \"qemu/cutils.h\"\n #include \"qemu/log.h\"\n #include \"qemu/option.h\"\n+#include \"qemu/base-arch-defs.h\"\n #include \"qemu/target-info.h\"\n #include \"qemu/units.h\"\n #include \"exec/gdbstub.h\"\n@@ -219,6 +220,9 @@ static bool cmd_can_preconfig(const HMPCommand *cmd)\n \n static bool cmd_available(const HMPCommand *cmd)\n {\n+    if (cmd->arch_bitmask && !qemu_arch_available(cmd->arch_bitmask)) {\n+        return false;\n+    }\n     return phase_check(PHASE_MACHINE_READY) || cmd_can_preconfig(cmd);\n }\n \n",
    "prefixes": [
        "v4",
        "11/32"
    ]
}