get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2222889,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2222889/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260414003001.97571-8-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": "<20260414003001.97571-8-philmd@linaro.org>",
    "date": "2026-04-14T00:29:39",
    "name": "[v3,07/27] 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/20260414003001.97571-8-philmd@linaro.org/mbox/",
    "series": [
        {
            "id": 499762,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/499762/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=499762",
            "date": "2026-04-14T00:29:32",
            "name": "monitor: Remove need of per-target handlers",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/499762/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2222889/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2222889/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=LYj+B3S9;\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 4fvlZv1455z1yHH\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 10:31:51 +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 1wCRgM-0001fY-LV; Mon, 13 Apr 2026 20:31:12 -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 1wCRgC-0001S2-6M\n for qemu-devel@nongnu.org; Mon, 13 Apr 2026 20:31:02 -0400",
            "from mail-wm1-x332.google.com ([2a00:1450:4864:20::332])\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 1wCRgA-00039b-47\n for qemu-devel@nongnu.org; Mon, 13 Apr 2026 20:30:59 -0400",
            "by mail-wm1-x332.google.com with SMTP id\n 5b1f17b1804b1-4887ca8e529so32220435e9.0\n for <qemu-devel@nongnu.org>; Mon, 13 Apr 2026 17:30:57 -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-488ede156a1sm5574775e9.2.2026.04.13.17.30.55\n (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);\n Mon, 13 Apr 2026 17:30:55 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1776126656; x=1776731456; 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=1bo5Y+UZCJy4gHCz2x1tdhwNQXL4/DMiX/PocQwagYM=;\n b=LYj+B3S97dxjy7f6ZCf/qmbLRl/SOhttxHpYUpIVCfORDz7nBQ5nFwEY+szRPJLMHx\n qAyITHyQHjR+xdqk7qMFK5LoLLndIkNfbA9JvE4QWg3CKtZDKkUvDnzfUWjRZGzabKAz\n TpQxkU8u1HxJ52Npms+5PRfXG1syrAWkrVye6LsK+5V8PyReLi8f5LwrUjOcsoJNuF58\n 9UpusRNdxD1iReHNAHjZyM/K4xifSb0xgxK6FaR0aH1PXXIYv9Mg3W5Z42TXSyjzbHJB\n dFygrFNFOKc+Cp2hGJzz0tvIksF7k3re4tM4tOObLJwQvGhnS6XXryYOO/sIJIcsESoG\n yM/g==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776126656; x=1776731456;\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=1bo5Y+UZCJy4gHCz2x1tdhwNQXL4/DMiX/PocQwagYM=;\n b=PsiQ151SYQXz4YLLkmkGag4Zg6oBW98Xqob+9RxP7CDOy5GLNGofilJ3ZLfoBE1dqI\n 14/fdTwwIu3rEcIZ70jfS9vGOymkhdkQFqxqsSUMo8Ap230qtdOJ8P8JCaSe91btsklu\n cZjQSkfvRoWmf/ZiFu6sEe43b93MpeuavBxKrWVcRx9JURFPA0z9VkJqilZpVy3fFsnp\n CavhX0hVekicqSjqKO0Yc7vhslnji93BsBdgZ2f87EV6i5Z9AeXV/P9i9jffEGkrz1qF\n 72XA9eteW4IlopWKTVY5uqaupMUP8S6vh3WGkchZxHlLHCBmEMRhY4lETX5xy7MKLk3p\n AVWg==",
        "X-Gm-Message-State": "AOJu0Yzr+FXY8BiEKzyIHs4k8DzBIoYGPxHQDkzTSAw9Fc+HFIAuLWIZ\n OEIj9NFD615B5CC2YYpTLonooSu9AZytx3aDSS2q3MYUDMkKtsPdaTdenNjQEW+rpC8ajSwihM2\n tklVMFhg=",
        "X-Gm-Gg": "AeBDieuvEb4fvA7LCshieTqzmOOnYJXDuEP0rzJo+UiB/I4OTQ3Ak9xqbs1tOdlO/VW\n BIkPFL3inIts1tK6ZvjrSSoq+fcukfwHzxtgV+dqTguu86SsM3nK7Ev29m+rOpZCBILIqQ5m2fb\n YAsRrczokgBYVqLwahrC9o+iS9nlG0cD2sZHtFM/7vhDQvaGfiFsU0OmdUdxDmqxLrao3yuHbe1\n 3u9PTFFfuooK+15Gt17LKW/aU8x+lXFYpEnCfTTww5OWZG/K4/kXgAjxws+ul5QImJPABSu5Ohh\n HdJsj0GuBDgibmehOASkFJRbFETwD5LsY0nK8SQ/6mDLbjVj3G9pltSgfpRGb2+p8l+2pLkRsKJ\n jby2vktscGEkhSqcPNP/huoC8v/OfQrArKHnHSvRlO17AXVSyS8k3bYPh0dgf1mV6AzzWl7XieD\n 7GIw0sLR82NHDIth9E5VUc+cmEBRHBodeXQOk+nsD12J4Bq+XCl5+btVOJYbNtBxCAU1enw+yY",
        "X-Received": "by 2002:a05:600c:8717:b0:477:9890:9ab8 with SMTP id\n 5b1f17b1804b1-488d6816f5amr210993855e9.3.1776126656164;\n Mon, 13 Apr 2026 17:30:56 -0700 (PDT)",
        "From": "=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>",
        "To": "qemu-devel@nongnu.org",
        "Cc": "Pierrick Bouvier <pierrick.bouvier@linaro.org>,\n Markus Armbruster <armbru@redhat.com>,\n Richard Henderson <richard.henderson@linaro.org>,\n \"Dr. David Alan Gilbert\" <dave@treblig.org>,\n Paolo Bonzini <pbonzini@redhat.com>,\n =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>",
        "Subject": "[PATCH v3 07/27] monitor: Introduce HMPCommand::arch_bitmask field",
        "Date": "Tue, 14 Apr 2026 02:29:39 +0200",
        "Message-ID": "<20260414003001.97571-8-philmd@linaro.org>",
        "X-Mailer": "git-send-email 2.53.0",
        "In-Reply-To": "<20260414003001.97571-1-philmd@linaro.org>",
        "References": "<20260414003001.97571-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::332;\n envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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": [
        "v3",
        "07/27"
    ]
}