Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2222173/?format=api
{ "id": 2222173, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2222173/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260410195323.17937-22-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": "<20260410195323.17937-22-philmd@linaro.org>", "date": "2026-04-10T19:53:15", "name": "[v2,21/27] monitor: Do not check TARGET_S390X to build s390x commands", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "26da9081ae11d297696058f5b62e4f24f9a4d9c6", "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/20260410195323.17937-22-philmd@linaro.org/mbox/", "series": [ { "id": 499498, "url": "http://patchwork.ozlabs.org/api/1.1/series/499498/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=499498", "date": "2026-04-10T19:52:54", "name": "monitor: Remove need of per-target handlers", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/499498/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2222173/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2222173/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=N8tYr4dn;\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=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from lists.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 4fsndJ6sDnz1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 11 Apr 2026 05:57:08 +1000 (AEST)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wBHxT-0006hg-KN; Fri, 10 Apr 2026 15:56:03 -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 1wBHxR-0006XL-Ot\n for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:56:01 -0400", "from mail-wm1-x335.google.com ([2a00:1450:4864:20::335])\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 1wBHxO-0003bO-IC\n for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:56:01 -0400", "by mail-wm1-x335.google.com with SMTP id\n 5b1f17b1804b1-48897fd88ebso25629685e9.2\n for <qemu-devel@nongnu.org>; Fri, 10 Apr 2026 12:55:58 -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-488d5888c12sm109936675e9.3.2026.04.10.12.55.55\n (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);\n Fri, 10 Apr 2026 12:55:56 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1775850957; x=1776455757; 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=Ns/VNhECUVMMVKjm49BzmvODa90VglcciVurHoSA27A=;\n b=N8tYr4dnvRwEFXBVQ1UIzZnyXtt/F5Bo4hZFdAmWl8HxWaS8OLhvdnYf3h884MQ4Sy\n hauLUX7ehGcsTUp6nKL0DN9Lpk6ZH0v64N+0JLmQ0KLXbnBINiSwaJ+xS0L+TMklSO0W\n 8kHmLldVMaeDcmECM1DZ2bZqyJpZUGJH7YfVNPEe58JQqRMwrtTtj7oBT0yKej5Odb7Q\n gEgsxD/t0KLwwjzzG4lJ8xQajkz0/vYiO32zfQWNYAMtDgmJbg6D2yp46Zk6BU+pIsVw\n /gLPDO69y3pDEV+l/zeQLPvRkRoWnDE2FDu370PPg/fvDYgZiqDUiZMRwlALwJtRRsLk\n 54eQ==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775850957; x=1776455757;\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=Ns/VNhECUVMMVKjm49BzmvODa90VglcciVurHoSA27A=;\n b=SHJEouHScAUKtQq5TzbHY6eMUSmKTKvKXBee2CyiYGw4i9Uthreg8Fp/Jo80+EZVkH\n ogitdKMY5OaVkkbu01uKFA0HmtOZ+mTiMhAing6UM/YVvD4addWp/QIUgyVbZG6uGscL\n 2Y8RNsbO0j98TY435nbLlxptWianhYNaMqZ+1J0qK4brCtgq2teZc8YFh9zzOJ6TCeak\n apIMsCJ9LFlc/aSj4ffIi7n43C/1Jg+pUxUKGvNZN/ko2PIK9bwlC0+rc5UOwVC9A0Ib\n SgU9s7bpUQE+89LOeVlSEITCPO1Vz5ICNmFRzoTKriDILhj9eea/ccjbh2nKma0XgC9E\n abZw==", "X-Gm-Message-State": "AOJu0Yy1mDAc0jqEWVSQ0fNLd1kUh6BDKdDgbqnqS64tZ+PpJaSRxg2G\n 7j95rjYgl6+SibwQpmgMJHwk8zub9DAnIJwhCvQTncOXcBlXgdEXK47VP27oofmKh8kpTR6vfW4\n FULP+8x4=", "X-Gm-Gg": "AeBDiesyUT0g0VZDE3LxNCLHSAgsu3qAqlaxnRzQ2soJMVy5Zx6Qz9TPWingz5BZKme\n gLQAApD9S4nDeUvFyl7dlwhOXOXS9OoPo3kJYDVKtGkjpwSN4bfFanSshgkVtXCAjbDgUursQfe\n cr+LqyrpyMLVzGuOVcSzQmVfTOY959pqqdLo4EhrRBeMwdZRFoLmK6kKjCGEsTW++FaP6z0CZgp\n 6LCuPhBxOQ2/UXNYuO9nULC0gvv3/RIJh+T6nR8FhVRwXYS94L8Vh0PLN5tMTfLqkZo/VmGYY2C\n Gym7uFD7F+UIiNqxQTmz6wCn83h3ymV3mmjdvHA7PiIVU4rM6dVp+Vu2BwB7ngOaNB/Q/mDAv7i\n Rf12JfcKy5B+WjkCmz7Mpj29wNzzd5kULrpKzGcAN1BCvksBGMkQXPYjtOE7GaGHDQ8mbInSp5D\n cq3Qn95vGaI+We8FZ3+nC8l8vFse4c654wXihozEZAJtsxwvv+13kUS+5Hm9q+n96nS5x6oyya", "X-Received": "by 2002:a05:600c:64c4:b0:486:fbd1:9dc0 with SMTP id\n 5b1f17b1804b1-488d68c2c56mr54818125e9.22.1775850956615;\n Fri, 10 Apr 2026 12:55:56 -0700 (PDT)", "From": "=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>", "To": "qemu-devel@nongnu.org", "Cc": "Richard Henderson <richard.henderson@linaro.org>,\n \"Dr. David Alan Gilbert\" <dave@treblig.org>,\n Pierrick Bouvier <pierrick.bouvier@linaro.org>, qemu-riscv@nongnu.org,\n Markus Armbruster <armbru@redhat.com>, qemu-s390x@nongnu.org,\n kvm@vger.kernel.org, qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud?=\n\t=?utf-8?q?=C3=A9?= <philmd@linaro.org>, Cornelia Huck <cohuck@redhat.com>,\n Eric Farman <farman@linux.ibm.com>, Matthew Rosato <mjrosato@linux.ibm.com>,\n Paolo Bonzini <pbonzini@redhat.com>", "Subject": "[PATCH v2 21/27] monitor: Do not check TARGET_S390X to build s390x\n commands", "Date": "Fri, 10 Apr 2026 21:53:15 +0200", "Message-ID": "<20260410195323.17937-22-philmd@linaro.org>", "X-Mailer": "git-send-email 2.53.0", "In-Reply-To": "<20260410195323.17937-1-philmd@linaro.org>", "References": "<20260410195323.17937-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::335;\n envelope-from=philmd@linaro.org; helo=mail-wm1-x335.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=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": "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 inconditionally within hw/s390x/,\ndefine them in the same stub file.\n\nSigned-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>\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 1810625eb1e..e53158143a8 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 a0a063db8e4..c8ce8579424 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 struct MonitorDef {\n const char *name;\ndiff --git a/monitor/hmp-target.c b/monitor/hmp-target.c\nindex 9d8dcb8835a..4968d511101 100644\n--- a/monitor/hmp-target.c\n+++ b/monitor/hmp-target.c\n@@ -35,11 +35,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 356d7800760..d4a6bc0dde4 100644\n--- a/stubs/meson.build\n+++ b/stubs/meson.build\n@@ -84,6 +84,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": [ "v2", "21/27" ] }