Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2222185/?format=api
{ "id": 2222185, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2222185/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260410195323.17937-28-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-28-philmd@linaro.org>", "date": "2026-04-10T19:53:21", "name": "[v2,27/27] monitor: Merge hmp-target.c code within hmp-cmds.c", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "07315b52a397cd0635289197e70a01a881371ecc", "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-28-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/2222185/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2222185/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=Q2maWj+/;\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 4fsnf971Hqz1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 11 Apr 2026 05:57:53 +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 1wBHyd-0002Dk-5V; Fri, 10 Apr 2026 15:57:15 -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 1wBHya-00029g-HT\n for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:57:12 -0400", "from mail-wm1-x330.google.com ([2a00:1450:4864:20::330])\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 1wBHy4-0004vK-8v\n for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:57:12 -0400", "by mail-wm1-x330.google.com with SMTP id\n 5b1f17b1804b1-483487335c2so26372345e9.2\n for <qemu-devel@nongnu.org>; Fri, 10 Apr 2026 12:56:39 -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-488d531f1f9sm124274295e9.1.2026.04.10.12.56.37\n (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);\n Fri, 10 Apr 2026 12:56:37 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1775850998; x=1776455798; 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=TnjRe5b33HAs4SIsako+kOOSPGazNPDfUbCOKtysLcw=;\n b=Q2maWj+/L7brHeiwqlqdYeP+o/fCrvIPwee7m+0MISUo6xN6RPlAp48OnKwbqrfMj2\n 5EJltMnnMZaRQe818qvxoSwORUH5vNkvwbRH8WuLJ/+J24N7uClGgj5M11nH+VFnxq4m\n Op0ISVKbobLa00R5xHdhZ4KCAlFGWl5N/VmvF3eqKhAxSStzpyO93zqYD2fVviRGTqEV\n ppqOpRFNqu19chbZpr5+vXmezYRf6aohqqOYsHHctsaWs+e3BNUiz51O0zHYa4KVLraI\n BXMk5LI2CW+RrAos0q4bDSGnlfBseyL3at8ANJXqa1B7GqbcvcWPJPIvQX+VsXhK/e/Y\n ku4Q==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775850998; x=1776455798;\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=TnjRe5b33HAs4SIsako+kOOSPGazNPDfUbCOKtysLcw=;\n b=UYUcnRODYVFDUFhAVUwmuUDObfjOpSY72ByG0SPFx0zc2RJbtzuIfRk6M7e9kTxlHq\n a9KEQKcxa7IKGTaLS64vPf2CKuZLZrcj7aT0EYqnqfzeurozobOlFXXrZN/qqfg6V2w2\n 5JC5KJlgYC8THAutgaTc9xPIiCnAYwfmvWK8z2lfVo1s9+y7v0H0DSYAPm7GC4SkU54V\n ZKpEBj8eDOjm3Yo/t6oTRC7GyMXd9gil9F0bfQZPsdBa3NXccUtx2qOpxe4gbTXyO7kG\n Kq6Xr++zaZ84TnXDMgpNi2c6dir92PCv4q4skO0PgVDXioULHy2exWIezdmNJE7PHcxa\n zR9g==", "X-Gm-Message-State": "AOJu0YwpMYAurXZ2WMzNHNPaHiyjdXRptVoLizrldJyQaXLqizJEKXO4\n dKKmHhQeW4rJkIgSFB4KSC4lvsh4M3zHtp6DEbFe4Yem+583YxE9x7iWfA4L89TKm1G02KAphQ+\n E0NdkVgM=", "X-Gm-Gg": "AeBDieuBumsU50DOwV7P715IKoh26fZV24S5da9705CzRc7pt4kZI7drg8fXD1tN0al\n eUVX9hlruElpXyQGO3hH4GwrXdTXuRZhoCessx/vDgdhA3I0fiJ0/GxohZuGJ1gZZCQq6i/FxWk\n EtcAojYSf5SK6IQx3CvgvZ7J8bbr4lY4ZG2D9w7Dmhfib33K3UJ74SIvludLEGTpq4jc6uplfZZ\n 2gHMutZvG0N3UO5re/P12BOwufNs2KWJxKl4U8clMQ/BWeL0Ep8QZ1V77a/g2wV6VDSWUWbGMjb\n QMt3PhLNCzPFZNSguSCWuTsFbSTNFm62MgGNolVS5zTcQprHYZqMyhf95ekMtM9baHVsPByzEh9\n VSZUrqui7lOiaibj7yiPBGWD/9W+xDKMG+Na8FNNqrQfrxDj2XmI9rfBSG1fiOt1z/PAXdkCpTP\n Cs/uB+zLigOdFh0EKk4v7gEEIbI82+0V/QZkYpdPhX9zKnAKZqFiBut8EVkWy1NGaBXcBuKlsA", "X-Received": "by 2002:a05:600c:c0da:b0:488:936a:6220 with SMTP id\n 5b1f17b1804b1-488d685b577mr50873375e9.21.1775850998436;\n Fri, 10 Apr 2026 12:56:38 -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>", "Subject": "[PATCH v2 27/27] monitor: Merge hmp-target.c code within hmp-cmds.c", "Date": "Fri, 10 Apr 2026 21:53:21 +0200", "Message-ID": "<20260410195323.17937-28-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::330;\n envelope-from=philmd@linaro.org; helo=mail-wm1-x330.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": "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>\n---\n MAINTAINERS | 1 -\n monitor/hmp-cmds.c | 40 ++++++++++++++++++++++++\n monitor/hmp-target.c | 73 --------------------------------------------\n monitor/meson.build | 3 --\n 4 files changed, 40 insertions(+), 77 deletions(-)\n delete mode 100644 monitor/hmp-target.c", "diff": "diff --git a/MAINTAINERS b/MAINTAINERS\nindex 5dcd24a8a89..d184e25ddd4 100644\n--- a/MAINTAINERS\n+++ b/MAINTAINERS\n@@ -3414,7 +3414,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 4968d511101..00000000000\n--- a/monitor/hmp-target.c\n+++ /dev/null\n@@ -1,73 +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-\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": [ "v2", "27/27" ] }