Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2228694/?format=api
{ "id": 2228694, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2228694/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260427080738.77138-32-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-32-philmd@linaro.org>", "date": "2026-04-27T08:07:37", "name": "[v4,31/32] monitor: Merge hmp-target.c code within hmp-cmds.c", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "dfcf6fc5dbca145f80c8ca9a68b0e57b61e0c3f5", "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-32-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/2228694/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2228694/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=JBgiN6YS;\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 4g3x9r4tr4z1xvV\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 27 Apr 2026 18:12:00 +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 1wHH3l-00024k-44; Mon, 27 Apr 2026 04:11:17 -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 1wHH3k-00020J-2b\n for qemu-devel@nongnu.org; Mon, 27 Apr 2026 04:11:16 -0400", "from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b])\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 1wHH3i-0002zK-0F\n for qemu-devel@nongnu.org; Mon, 27 Apr 2026 04:11:15 -0400", "by mail-wm1-x32b.google.com with SMTP id\n 5b1f17b1804b1-488ab2db91aso140727325e9.3\n for <qemu-devel@nongnu.org>; Mon, 27 Apr 2026 01:11:13 -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-488fc0b4c85sm743195075e9.0.2026.04.27.01.11.11\n (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);\n Mon, 27 Apr 2026 01:11:11 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1777277472; x=1777882272; 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=GHuhl7sujEeEFbAkpoWph1gRfoj+IqsXXghTjX/XrLM=;\n b=JBgiN6YSc2lA2swjk1/9oj8zGMHykEcAe6Y70XToWBThwTzG8Tem/4piornqViu/lV\n 4aPpNZk/6LJePWK1ninZdYP8qkx1Y+IudMjVf+X5Ktw9zEEz4F5xR59rsUZN2HLfFQd/\n oT6LujYqBvqifx1QWjZTdX+A/f8p34t3Ng92OmI+dNkJffVDSFgmLzGrMjkGlqMmiknc\n Q50z+tBN4czhoP69fBq5skVUmBlSe6cVaVbsB3mPMl0fjoj9jPERzy3FHEFDgZ1ndqS3\n jBUGacu/ebXw4/crWKixmCNh8j5pb/R63E1/9IzcW6qJJ3ICHnGGHcpHr51JU6zYK1++\n 2K9Q==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777277472; x=1777882272;\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=GHuhl7sujEeEFbAkpoWph1gRfoj+IqsXXghTjX/XrLM=;\n b=XfX9gk2QXkXYy7kQubIsgwV0T0YyZrVbQ3lmS78jOS95xwDwM/ZYz/MD2jsnCmRuIl\n /Yt07vMZj4VeDGaz3u/md1rW/JkGh/1WSLaiIaME/V4hHXhIRtd8ibhL9RJECixz/scz\n g7Lku7Ii5X6JWd1Gz2DTPjCs54jpmQ4axpoSct78VUHCTlZ1c9DZh4uU7+Og9nALeJ3n\n Ohp34zF31lIvGkOezdQa10NC6Z3ifTZfkfzwpJL2ZOJ5I0PrYxuCG3L2ckNEnUW+MgRA\n UPf4wpzpiM8uArQRhGI5BYCx8uLKIo5g9v1Ne0R8Pbazq/1AsL77JULsKvskcpbM/+n/\n EUxg==", "X-Forwarded-Encrypted": "i=1;\n AFNElJ8ktk3MUORrku48djNVUTQGu53ioWiIZeEWAGVHynYp4AlP2LRTfXyNkxvv5+8LRYeF6gdJhB3rYwip@nongnu.org", "X-Gm-Message-State": "AOJu0YxtCxmwhssihVgTWwV2nTH/GsXLEt49vgWGXE3LCGxD3hqarD+J\n C0mGQSA/fNdvsgwhFiMAGE1dYdhyPfZp9jFIOfvIsATSIhrXjLoWTra9OrLRcDFmltALrAhjO8w\n g0VqPqvI=", "X-Gm-Gg": "AeBDieuTiFUhXS3SYiel4pAWyhGT17gaHhR0HQbeDQrzH6si05hIi3iRJTT6Ay3aGuL\n 1aFpMUXujwgWTnC5jENG5u2TkCZLu8y4mbvbYu291FJw679g+49nbZhmmM6zUkzFv5kx+y2e+sw\n 4C7XDW+6ueidk6Gw5cK8pKUoT0YXryKBqz+YC5JzcSI+kByIedUdGsEBwKMF640FPKSUUaMKqlQ\n tyrDsAD0GqHQ01fxL9ZdeukXKFma1bHSDSoWqcyxc4+xrOYhMAa3bsWJOnf+InTlw3Dv861NyES\n eB3d0Be4eP3ljIq8fx1Q50ABx0rqbWT4tqGeI/GS5o3vG4Uxzm6OZFXlim3pVbd22H09esd0eJN\n iEBgq4EL1d0nhC/oVoxV4drMaTAyMbjiyWVPW4yE0t2SeIsZp27mqBCwQFlBERMHmXvb+BNIhZs\n PrMrAJQmdCXnN9qWc1hDuLfoGDGb6ujcLH1WszzV646sFeTOgTh820k58UjQzqA6TSrIwAG+kWK\n wVVA/DA1mY=", "X-Received": "by 2002:a05:600c:3483:b0:486:fba7:b150 with SMTP id\n 5b1f17b1804b1-488fb7787d7mr583789875e9.15.1777277472211;\n Mon, 27 Apr 2026 01:11:12 -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 31/32] monitor: Merge hmp-target.c code within hmp-cmds.c", "Date": "Mon, 27 Apr 2026 10:07:37 +0200", "Message-ID": "<20260427080738.77138-32-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::32b;\n envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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": "hmp-target.c doesn't contain any target-specific code anymore.\nMerge it within hmp-cmds.c (which is already built once).\n\nSigned-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>\nReviewed-by: Richard Henderson <richard.henderson@linaro.org>\n---\n MAINTAINERS | 1 -\n monitor/hmp-cmds.c | 40 ++++++++++++++++++++++++\n monitor/hmp-target.c | 74 --------------------------------------------\n monitor/meson.build | 3 --\n 4 files changed, 40 insertions(+), 78 deletions(-)\n delete mode 100644 monitor/hmp-target.c", "diff": "diff --git a/MAINTAINERS b/MAINTAINERS\nindex 3e797b540d2..ea47dfd2cf8 100644\n--- a/MAINTAINERS\n+++ b/MAINTAINERS\n@@ -3388,7 +3388,6 @@ Human Monitor (HMP)\n M: Dr. David Alan Gilbert <dave@treblig.org>\n S: Maintained\n F: monitor/monitor-internal.h\n-F: monitor/hmp-target.c\n F: monitor/monitor.c\n F: monitor/hmp*\n F: hmp.h\ndiff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c\nindex e81632f5551..409a1a9c701 100644\n--- a/monitor/hmp-cmds.c\n+++ b/monitor/hmp-cmds.c\n@@ -14,6 +14,7 @@\n */\n \n #include \"qemu/osdep.h\"\n+#include \"qemu/base-arch-defs.h\"\n #include \"system/address-spaces.h\"\n #include \"system/ioport.h\"\n #include \"exec/gdbstub.h\"\n@@ -22,19 +23,58 @@\n #include \"monitor/hmp.h\"\n #include \"qemu/help_option.h\"\n #include \"monitor/hmp.h\"\n+#include \"monitor/hmp-completion.h\"\n #include \"monitor/monitor-internal.h\"\n+#include \"monitor/qdev.h\"\n #include \"qapi/error.h\"\n #include \"qapi/qapi-commands-control.h\"\n #include \"qapi/qapi-commands-machine.h\"\n #include \"qapi/qapi-commands-misc.h\"\n+#include \"block/block-hmp-cmds.h\"\n #include \"qobject/qdict.h\"\n #include \"qemu/cutils.h\"\n #include \"qemu/log.h\"\n+#include \"net/slirp.h\"\n+#include \"system/device_tree.h\"\n #include \"system/hw_accel.h\"\n #include \"system/memory.h\"\n #include \"system/system.h\"\n #include \"disas/disas.h\"\n \n+/* Please update hmp-commands.hx when adding or changing commands */\n+static HMPCommand hmp_info_cmds[] = {\n+#include \"hmp-commands-info.h\"\n+ { NULL, NULL, },\n+};\n+\n+/* hmp_cmds and hmp_info_cmds would be sorted at runtime */\n+static HMPCommand hmp_cmds[] = {\n+#include \"hmp-commands.h\"\n+ { NULL, NULL, },\n+};\n+\n+HMPCommand *hmp_cmds_for_target(bool info_command)\n+{\n+ return info_command ? hmp_info_cmds : hmp_cmds;\n+}\n+\n+static int\n+compare_mon_cmd(const void *a, const void *b)\n+{\n+ return strcmp(((const HMPCommand *)a)->name,\n+ ((const HMPCommand *)b)->name);\n+}\n+\n+static void __attribute__((__constructor__)) sortcmdlist(void)\n+{\n+ qsort(hmp_cmds, ARRAY_SIZE(hmp_cmds) - 1,\n+ sizeof(*hmp_cmds),\n+ compare_mon_cmd);\n+ qsort(hmp_info_cmds, ARRAY_SIZE(hmp_info_cmds) - 1,\n+ sizeof(*hmp_info_cmds),\n+ compare_mon_cmd);\n+}\n+\n bool hmp_handle_error(Monitor *mon, Error *err)\n {\n if (err) {\ndiff --git a/monitor/hmp-target.c b/monitor/hmp-target.c\ndeleted file mode 100644\nindex 2739383607d..00000000000\n--- a/monitor/hmp-target.c\n+++ /dev/null\n@@ -1,74 +0,0 @@\n-/*\n- * QEMU monitor, target-dependent part\n- *\n- * Copyright (c) 2003-2004 Fabrice Bellard\n- *\n- * Permission is hereby granted, free of charge, to any person obtaining a copy\n- * of this software and associated documentation files (the \"Software\"), to deal\n- * in the Software without restriction, including without limitation the rights\n- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n- * copies of the Software, and to permit persons to whom the Software is\n- * furnished to do so, subject to the following conditions:\n- *\n- * The above copyright notice and this permission notice shall be included in\n- * all copies or substantial portions of the Software.\n- *\n- * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n- * THE SOFTWARE.\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\"\n-#include \"system/device_tree.h\"\n-#include \"monitor/hmp.h\"\n-#include \"monitor/hmp-completion.h\"\n-#include \"block/block-hmp-cmds.h\"\n-#include \"qapi/qapi-commands-control.h\"\n-#include \"qapi/qapi-commands-misc.h\"\n-#include \"qapi/qapi-commands-machine.h\"\n-#include \"hw/core/sysemu-cpu-ops.h\"\n-\n-/* Make devices configuration available for use in hmp-commands*.hx templates */\n-#include CONFIG_DEVICES\n-\n-/* Please update hmp-commands.hx when adding or changing commands */\n-static HMPCommand hmp_info_cmds[] = {\n-#include \"hmp-commands-info.h\"\n- { NULL, NULL, },\n-};\n-\n-/* hmp_cmds and hmp_info_cmds would be sorted at runtime */\n-static HMPCommand hmp_cmds[] = {\n-#include \"hmp-commands.h\"\n- { NULL, NULL, },\n-};\n-\n-HMPCommand *hmp_cmds_for_target(bool info_command)\n-{\n- return info_command ? hmp_info_cmds : hmp_cmds;\n-}\n-\n-static int\n-compare_mon_cmd(const void *a, const void *b)\n-{\n- return strcmp(((const HMPCommand *)a)->name,\n- ((const HMPCommand *)b)->name);\n-}\n-\n-static void __attribute__((__constructor__)) sortcmdlist(void)\n-{\n- qsort(hmp_cmds, ARRAY_SIZE(hmp_cmds) - 1,\n- sizeof(*hmp_cmds),\n- compare_mon_cmd);\n- qsort(hmp_info_cmds, ARRAY_SIZE(hmp_info_cmds) - 1,\n- sizeof(*hmp_info_cmds),\n- compare_mon_cmd);\n-}\ndiff --git a/monitor/meson.build b/monitor/meson.build\nindex 585251804e4..4c58dd148c0 100644\n--- a/monitor/meson.build\n+++ b/monitor/meson.build\n@@ -7,6 +7,3 @@ system_ss.add(files(\n 'qemu-config-qmp.c',\n 'qmp-cmds.c',\n ))\n-\n-specific_ss.add(when: 'CONFIG_SYSTEM_ONLY',\n- if_true: [files('hmp-target.c')])\n", "prefixes": [ "v4", "31/32" ] }