get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2228671,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2228671/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260427080738.77138-14-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-14-philmd@linaro.org>",
    "date": "2026-04-27T08:07:19",
    "name": "[v4,13/32] monitor: Do not check TARGET_S390X to build s390x commands",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "43b37eaa4de3ecd1c1f5d8ddf7b2bcce58c72887",
    "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-14-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/2228671/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2228671/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=hUt31tiR;\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 4g3x7M608jz1yHv\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 27 Apr 2026 18:09: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 1wHH1y-0001ie-Sk; Mon, 27 Apr 2026 04:09:26 -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 1wHH1o-0001O2-22\n for qemu-devel@nongnu.org; Mon, 27 Apr 2026 04:09:20 -0400",
            "from mail-wm1-x331.google.com ([2a00:1450:4864:20::331])\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 1wHH1l-0001vJ-P8\n for qemu-devel@nongnu.org; Mon, 27 Apr 2026 04:09:15 -0400",
            "by mail-wm1-x331.google.com with SMTP id\n 5b1f17b1804b1-48a3e9862f0so52116325e9.1\n for <qemu-devel@nongnu.org>; Mon, 27 Apr 2026 01:09:12 -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-4899dc95920sm167976405e9.6.2026.04.27.01.09.09\n (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);\n Mon, 27 Apr 2026 01:09:10 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1777277351; x=1777882151; 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=0N5garPfkGQjAeUEzsjLtjevClXnBOjQBVGcUSmAQTU=;\n b=hUt31tiRtYBDDfMeg/P7McYqmi84LYz2qin14TvGwE+MbxvCUvpVAwqYAYNI66XDS7\n sVGJap+KbPFxbUJBuDjkAEByEP6n0H4z47CVlHEBEVHHCBRf4sF5hyKSfp+5eMQYZ4oE\n 7kCxf39L7KF8iJ+TWsGy18ocyWgMS4Xkk+2UOh6Ct+4yOCrAlKEd+pk4MH+ceaoXPobl\n XPa8cB0xmzsFAzsC9MWpvZZMZhq7W4L958NjbmZMaAEm/Quyx8zgQQo9qEAEiITQetSe\n kvGyIDkbM3i4quxDq0ZeFXfhc+mzCsAKXLqWU8QXf3R4l61NzI79ffugm5LrqwjqP7ii\n z4eQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777277351; x=1777882151;\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=0N5garPfkGQjAeUEzsjLtjevClXnBOjQBVGcUSmAQTU=;\n b=FtYCpxCEcB3AhRuNASVIxwWJrOc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vfjUCuf\n bfaAwzk9LhquWDeMFz58gUMaeXPsaWZc5kzts0zOFehllwk1yyON40oEQmL1JffcZYG6yEMNxml\n Pzy3T3c3jE=",
        "X-Received": "by 2002:a05:600c:3ba0:b0:486:faa8:9e4 with SMTP id\n 5b1f17b1804b1-488fb8b91a7mr543470445e9.12.1777277351292;\n Mon, 27 Apr 2026 01:09:11 -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 13/32] monitor: Do not check TARGET_S390X to build s390x\n commands",
        "Date": "Mon, 27 Apr 2026 10:07:19 +0200",
        "Message-ID": "<20260427080738.77138-14-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::331;\n envelope-from=philmd@linaro.org; helo=mail-wm1-x331.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": "These commands are filtered at build-time for s390x binary.\nBy using the recently introduced HMPCommand::arch_bitmask flag\nwe can filter them at runtime, making it possible to compile\nhmp-commands[-info].hx files once.\n\nSince the methods are used unconditionally within hw/s390x/,\ndefine them in the same stub file.\n\nSigned-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>\nReviewed-by: Richard Henderson <richard.henderson@linaro.org>\nAcked-by: Cornelia Huck <cohuck@redhat.com>\nReviewed-by: Eric Farman <farman@linux.ibm.com>\n---\n MAINTAINERS               |  1 +\n include/monitor/hmp.h     |  7 +++++++\n monitor/hmp-target.c      |  5 -----\n stubs/hmp-cmds-hw-s390x.c | 15 +++++++++++++++\n hmp-commands-info.hx      |  6 ++----\n hmp-commands.hx           |  6 ++----\n stubs/meson.build         |  1 +\n 7 files changed, 28 insertions(+), 13 deletions(-)\n create mode 100644 stubs/hmp-cmds-hw-s390x.c",
    "diff": "diff --git a/MAINTAINERS b/MAINTAINERS\nindex 8ed6648d094..5583df5087f 100644\n--- a/MAINTAINERS\n+++ b/MAINTAINERS\n@@ -122,6 +122,7 @@ F: include/hw/watchdog/wdt_diag288.h\n F: pc-bios/s390-ccw/\n F: pc-bios/s390-ccw.img\n F: stubs/qmp-cpu-s390x.c\n+F: stubs/hmp-cmds-hw-s390x.c\n F: target/s390x/\n F: docs/system/target-s390x.rst\n F: docs/system/s390x/\ndiff --git a/include/monitor/hmp.h b/include/monitor/hmp.h\nindex d694bfdf768..a29185741b8 100644\n--- a/include/monitor/hmp.h\n+++ b/include/monitor/hmp.h\n@@ -16,6 +16,13 @@\n \n #include \"qemu/readline.h\"\n #include \"qapi/qapi-types-common.h\"\n+#include \"monitor/monitor.h\"\n+\n+#define HMP_STUB(cmd) \\\n+    void hmp_##cmd(Monitor *mon, const QDict *qdict) \\\n+    { \\\n+        g_assert_not_reached(); \\\n+    }\n \n bool hmp_handle_error(Monitor *mon, Error *err);\n void hmp_help_cmd(Monitor *mon, const char *name);\ndiff --git a/monitor/hmp-target.c b/monitor/hmp-target.c\nindex f6dce326cf5..a222fd4c96a 100644\n--- a/monitor/hmp-target.c\n+++ b/monitor/hmp-target.c\n@@ -36,11 +36,6 @@\n #include \"qapi/qapi-commands-misc.h\"\n #include \"qapi/qapi-commands-machine.h\"\n \n-#if defined(TARGET_S390X)\n-#include \"hw/s390x/storage-keys.h\"\n-#include \"hw/s390x/storage-attributes.h\"\n-#endif\n-\n /* Make devices configuration available for use in hmp-commands*.hx templates */\n #include CONFIG_DEVICES\n \ndiff --git a/stubs/hmp-cmds-hw-s390x.c b/stubs/hmp-cmds-hw-s390x.c\nnew file mode 100644\nindex 00000000000..2b4f4cac79f\n--- /dev/null\n+++ b/stubs/hmp-cmds-hw-s390x.c\n@@ -0,0 +1,15 @@\n+/*\n+ * Human Monitor hw/s390x stubs\n+ *\n+ * Copyright (c) Linaro\n+ *\n+ * SPDX-License-Identifier: GPL-2.0-or-later\n+ */\n+\n+#include \"qemu/osdep.h\"\n+#include \"monitor/hmp.h\"\n+\n+HMP_STUB(dump_skeys)\n+HMP_STUB(info_cmma)\n+HMP_STUB(info_skeys)\n+HMP_STUB(migrationmode)\ndiff --git a/hmp-commands-info.hx b/hmp-commands-info.hx\nindex 463038c302a..28dec25642d 100644\n--- a/hmp-commands-info.hx\n+++ b/hmp-commands-info.hx\n@@ -717,30 +717,28 @@ SRST\n     Show rocker OF-DPA groups.\n ERST\n \n-#if defined(TARGET_S390X)\n     {\n         .name       = \"skeys\",\n         .args_type  = \"addr:l\",\n         .params     = \"address\",\n         .help       = \"Display the value of a storage key\",\n         .cmd        = hmp_info_skeys,\n+        .arch_bitmask = QEMU_ARCH_S390X,\n     },\n-#endif\n \n SRST\n   ``info skeys`` *address*\n     Display the value of a storage key (s390 only)\n ERST\n \n-#if defined(TARGET_S390X)\n     {\n         .name       = \"cmma\",\n         .args_type  = \"addr:l,count:l?\",\n         .params     = \"address [count]\",\n         .help       = \"Display the values of the CMMA storage attributes for a range of pages\",\n         .cmd        = hmp_info_cmma,\n+        .arch_bitmask = QEMU_ARCH_S390X,\n     },\n-#endif\n \n SRST\n   ``info cmma`` *address*\ndiff --git a/hmp-commands.hx b/hmp-commands.hx\nindex 06d7b17bf25..ff65b39b454 100644\n--- a/hmp-commands.hx\n+++ b/hmp-commands.hx\n@@ -1125,30 +1125,28 @@ SRST\n \n ERST\n \n-#if defined(TARGET_S390X)\n     {\n         .name       = \"dump-skeys\",\n         .args_type  = \"filename:F\",\n         .params     = \"\",\n         .help       = \"Save guest storage keys into file 'filename'.\\n\",\n         .cmd        = hmp_dump_skeys,\n+        .arch_bitmask = QEMU_ARCH_S390X,\n     },\n-#endif\n \n SRST\n ``dump-skeys`` *filename*\n   Save guest storage keys to a file.\n ERST\n \n-#if defined(TARGET_S390X)\n     {\n         .name       = \"migration_mode\",\n         .args_type  = \"mode:i\",\n         .params     = \"mode\",\n         .help       = \"Enables or disables migration mode\\n\",\n         .cmd        = hmp_migrationmode,\n+        .arch_bitmask = QEMU_ARCH_S390X,\n     },\n-#endif\n \n SRST\n ``migration_mode`` *mode*\ndiff --git a/stubs/meson.build b/stubs/meson.build\nindex af4051e6c5e..99a89c00066 100644\n--- a/stubs/meson.build\n+++ b/stubs/meson.build\n@@ -87,6 +87,7 @@ if have_system\n   stub_ss.add(files('qmp-cpu.c'))\n   stub_ss.add(files('qmp-cpu-s390x.c'))\n   stub_ss.add(files('qmp-cpu-s390x-kvm.c'))\n+  stub_ss.add(files('hmp-cmds-hw-s390x.c'))\n endif\n \n if have_system or have_user\n",
    "prefixes": [
        "v4",
        "13/32"
    ]
}