From nobody Sun Jul 26 02:46:40 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1777277459; cv=none; d=zohomail.com; s=zohoarc; b=L6QWc3l7eS9s7aRnx9buEeEEiEpU+2/BQpUYoYTyguw+QZRbBtlfMvZ9Re+6oWSJimQYgS65/dQrwWwHQ/qYjfgCXp/2wJ5uGpqlslo/IJjyw02gn7bpa6TD+04BU8TnMOVmPKLbPy0Uw35d55xK6QgL7yDMs5VE95DWNT+UfaA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1777277459; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=d+q6GyrWBAau8tlLAMlLqkdBys28oid3Y1FUgEt4bzQ=; b=MAn7cT5RYB7P5spKSq96PU4yYdvjjM1IwNp+pfC/0uEKKOBBp7EoJZ+qqraqo5wBnRi9lrnpHg0rY+4PNGw1+oeBgP6JQiJpXqeV7ufCqbh188wVHKCR3+cffcNPX2Y2U+bbgy8Fi3h2ZjSLDnn1M5NjTWP88hxUVIv0R0XCWvk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1777277459362958.9370101946843; Mon, 27 Apr 2026 01:10:59 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wHH3D-0008A6-OY; Mon, 27 Apr 2026 04:10:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wHH2z-0007pT-35 for qemu-devel@nongnu.org; Mon, 27 Apr 2026 04:10:31 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wHH2w-0002YS-Kh for qemu-devel@nongnu.org; Mon, 27 Apr 2026 04:10:28 -0400 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-43d6fbd0954so7677889f8f.1 for ; Mon, 27 Apr 2026 01:10:26 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43fe4cb1405sm80079851f8f.4.2026.04.27.01.10.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Apr 2026 01:10:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1777277425; x=1777882225; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=d+q6GyrWBAau8tlLAMlLqkdBys28oid3Y1FUgEt4bzQ=; b=P9m9+w4qxFfWutP7j9EKjqmT0g75jbk2vhLfFUs92vy1djeEGsm8ri3BfnFLLXt02R oBYPXmrLuxT3oWzAIP/0IaMuTQfGB6xGvqdqP5m4AtBveikoW3v3L72iWuVgz3ltH0ND +TO3mvY/RZRTmriOb7MJz++UPlCOe9xbs4QIt5Eo7vAMZLH2JPETncNjkvSalP1C/tkf pRnhS+prQy2jNMuAg4nEhRYguIOKBlPYrpRTCRrLo4lPvRmncZcWI1PWurB6RfMre+4R b7NpykBZTo4G/451Aou3fHWvyddFNnSCnfrLA3egrJrYsGcuXtdyIJbLi8Ri3YTxh9vI W0og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777277425; x=1777882225; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=d+q6GyrWBAau8tlLAMlLqkdBys28oid3Y1FUgEt4bzQ=; b=BXm04zdAi+BRcgVewTnRPsU4dtovKs4etxJoEdbdxSnONK6WA3g/+lfXANgqdLTK0j K37yECLgv1m33Y+YkdmAQ8StupTQ4pfA+rsn4ht+9jx4jHNSJlL1QaVFtwYJplKrR8jk W1f9CZL3XMwSICGV1LuAGKZ4kxZfpsulqInvK2HQW7qxZHKLq49cdw/YFfztq/CPVN33 AiMU+gVl9u2P7g+e5ko9f/pSG/nY3UJ+57YLzcIer0Z3LxkQacsy7uWY2fEhWB5bT6z0 hx999liOePpSGI5k5y6nFm8aOdEtwE7T1cykJs89EZ0NvzMWgYGSC2gEm1FzUaVtdhlM xR4Q== X-Forwarded-Encrypted: i=1; AFNElJ89wcI7FcNjAFNI7xldf8oroUbaxmNFn4xWqshjZ8PI260OatS+mMTqCQZU/R/w0x5lW6T4aLFg+h09@nongnu.org X-Gm-Message-State: AOJu0YyUkVv5/aYO33JsblUzc2NwgF4yTdtgxD6Rk1wie2lbN5tcnav/ TVajL9ilDKdnYFLJF/NOBPjsySjyhkMBQCMd4vV/9wgMLQTccC1nDgpSX/71qbtfw8D8E3ziUqi UofK327A= X-Gm-Gg: AeBDies6kppvS6n6DaNNVwBR+9jf/ADRWvsIZ8pQQ41nnrDysf59Don1PeN5dByc6/0 4b8TX/mXe3NBxB/Mlo3Z8Wi6b/A7XncmQzo7aqbFduK47YKD13YsLXT9/RgINdn/eD9+AfSwRfT xsumEQJnWQAtYRUgb1NUzkpcJeGbwM0S/AomRVKuR1MCgtnExoRpo3Vs/aGFYv0xE3a+EEkvSqO iJ+/9ApErC1WAVh7JJa7UOkXkIuw5ketibqLtXI3qmi1PguninorB2S/Igy2K5hQi0vhAve64/2 wrBSM1m8d3MPeF7o9Z3skVWcfVI3pxrbJBFAjhARhOIEHIfzzMQgS3kuehvTfe2bnAEKFX6QJg8 kS35L37DmLgyW64IEPGMf9Y8u03U6Hnk9hVcIbaL5lgfVHWamrqmG3/2UrNnKexYTGuXAREXgPg krYugbimOtDOCDhsQfcchVJB4RXppBCd3hp6nhM0SFj/iBCywZaPowuB5OR1747fsNdl7Ek6e27 b/B4i0IRPA= X-Received: by 2002:a05:6000:290b:b0:441:1fa5:457f with SMTP id ffacd0b85a97d-4411fa54aecmr40295191f8f.28.1777277424683; Mon, 27 Apr 2026 01:10:24 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Markus Armbruster , qemu-devel@nongnu.org Subject: [PATCH v4 24/32] monitor: Remove 'monitor/hmp-target.h' header Date: Mon, 27 Apr 2026 10:07:30 +0200 Message-ID: <20260427080738.77138-25-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: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1777277461270154100 The "monitor/hmp-target.h" header doesn't contain any target-specific declarations anymore. Merge it with "monitor/hmp.h", its target-agnostic counterpart. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Richard Henderson Reviewed-by: Pierrick Bouvier --- MAINTAINERS | 1 - include/monitor/hmp-target.h | 41 ----------------------------------- include/monitor/hmp.h | 11 ++++++++++ hw/i386/sgx-stub.c | 1 - hw/i386/sgx.c | 1 - monitor/hmp-cmds.c | 1 - monitor/hmp-target.c | 1 - monitor/hmp.c | 1 - stubs/target-monitor-defs.c | 2 +- target/i386/cpu-apic.c | 1 - target/i386/monitor.c | 1 - target/i386/sev-system-stub.c | 1 - target/i386/sev.c | 1 - target/m68k/monitor.c | 1 - target/ppc/monitor.c | 2 -- target/riscv/monitor.c | 1 - target/sh4/monitor.c | 1 - target/sparc/monitor.c | 1 - target/xtensa/monitor.c | 1 - 19 files changed, 12 insertions(+), 59 deletions(-) delete mode 100644 include/monitor/hmp-target.h diff --git a/MAINTAINERS b/MAINTAINERS index eeb7115edcd..3e797b540d2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3395,7 +3395,6 @@ F: hmp.h F: hmp-commands*.hx F: include/monitor/hmp.h F: include/monitor/hmp-completion.h -F: include/monitor/hmp-target.h F: tests/qtest/test-hmp.c F: include/qemu/qemu-print.h F: util/qemu-print.c diff --git a/include/monitor/hmp-target.h b/include/monitor/hmp-target.h deleted file mode 100644 index ae34ca65ded..00000000000 --- a/include/monitor/hmp-target.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * QEMU monitor - * - * Copyright (c) 2003-2004 Fabrice Bellard - * - * Permission is hereby granted, free of charge, to any person obtaining a= copy - * of this software and associated documentation files (the "Software"), t= o deal - * in the Software without restriction, including without limitation the r= ights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or se= ll - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included= in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS= OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OT= HER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING= FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS = IN - * THE SOFTWARE. - */ - -#ifndef MONITOR_HMP_TARGET_H -#define MONITOR_HMP_TARGET_H - -typedef struct MonitorDef MonitorDef; - -struct MonitorDef { - const char *name; - int offset; - int64_t (*get_value)(Monitor *mon, const MonitorDef *md, int offset); -}; - -const MonitorDef *target_monitor_defs(void); - -CPUArchState *mon_get_cpu_env(Monitor *mon); -CPUState *mon_get_cpu(Monitor *mon); - -#endif /* MONITOR_HMP_TARGET_H */ diff --git a/include/monitor/hmp.h b/include/monitor/hmp.h index a29185741b8..8abe3168924 100644 --- a/include/monitor/hmp.h +++ b/include/monitor/hmp.h @@ -24,6 +24,17 @@ g_assert_not_reached(); \ } =20 +typedef struct MonitorDef { + const char *name; + int offset; + int64_t (*get_value)(Monitor *mon, const struct MonitorDef *md, int of= fset); +} MonitorDef; + +const MonitorDef *target_monitor_defs(void); + +CPUArchState *mon_get_cpu_env(Monitor *mon); +CPUState *mon_get_cpu(Monitor *mon); + bool hmp_handle_error(Monitor *mon, Error *err); void hmp_help_cmd(Monitor *mon, const char *name); strList *hmp_split_at_comma(const char *str); diff --git a/hw/i386/sgx-stub.c b/hw/i386/sgx-stub.c index 2b083c77bc1..59d58926311 100644 --- a/hw/i386/sgx-stub.c +++ b/hw/i386/sgx-stub.c @@ -1,7 +1,6 @@ #include "qemu/osdep.h" #include "monitor/monitor.h" #include "monitor/hmp.h" -#include "monitor/hmp-target.h" #include "hw/i386/pc.h" #include "hw/i386/sgx-epc.h" #include "qapi/qapi-commands-misc-i386.h" diff --git a/hw/i386/sgx.c b/hw/i386/sgx.c index 5e792e8e6e9..7e4c509f5a4 100644 --- a/hw/i386/sgx.c +++ b/hw/i386/sgx.c @@ -17,7 +17,6 @@ #include "monitor/qdev.h" #include "monitor/monitor.h" #include "monitor/hmp.h" -#include "monitor/hmp-target.h" #include "qapi/error.h" #include "qemu/error-report.h" #include "qapi/qapi-commands-misc-i386.h" diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index bc26b39d708..e81632f5551 100644 --- a/monitor/hmp-cmds.c +++ b/monitor/hmp-cmds.c @@ -22,7 +22,6 @@ #include "monitor/hmp.h" #include "qemu/help_option.h" #include "monitor/hmp.h" -#include "monitor/hmp-target.h" #include "monitor/monitor-internal.h" #include "qapi/error.h" #include "qapi/qapi-commands-control.h" diff --git a/monitor/hmp-target.c b/monitor/hmp-target.c index 550a7178052..2739383607d 100644 --- a/monitor/hmp-target.c +++ b/monitor/hmp-target.c @@ -28,7 +28,6 @@ #include "monitor/qdev.h" #include "net/slirp.h" #include "system/device_tree.h" -#include "monitor/hmp-target.h" #include "monitor/hmp.h" #include "monitor/hmp-completion.h" #include "block/block-hmp-cmds.h" diff --git a/monitor/hmp.c b/monitor/hmp.c index 618ded40207..d7b2f731def 100644 --- a/monitor/hmp.c +++ b/monitor/hmp.c @@ -28,7 +28,6 @@ #include "hw/core/sysemu-cpu-ops.h" #include "monitor-internal.h" #include "monitor/hmp.h" -#include "monitor/hmp-target.h" #include "qobject/qdict.h" #include "qobject/qnum.h" #include "qemu/bswap.h" diff --git a/stubs/target-monitor-defs.c b/stubs/target-monitor-defs.c index 35a0a342772..0dd4cdb34f6 100644 --- a/stubs/target-monitor-defs.c +++ b/stubs/target-monitor-defs.c @@ -1,5 +1,5 @@ #include "qemu/osdep.h" -#include "monitor/hmp-target.h" +#include "monitor/hmp.h" =20 const MonitorDef *target_monitor_defs(void) { diff --git a/target/i386/cpu-apic.c b/target/i386/cpu-apic.c index eaa10ad2a3d..5599a4675c5 100644 --- a/target/i386/cpu-apic.c +++ b/target/i386/cpu-apic.c @@ -11,7 +11,6 @@ #include "qapi/error.h" #include "monitor/monitor.h" #include "monitor/hmp.h" -#include "monitor/hmp-target.h" #include "system/hw_accel.h" #include "system/kvm.h" #include "system/xen.h" diff --git a/target/i386/monitor.c b/target/i386/monitor.c index 98df5c7fd12..1befb8ea824 100644 --- a/target/i386/monitor.c +++ b/target/i386/monitor.c @@ -25,7 +25,6 @@ #include "qemu/osdep.h" #include "cpu.h" #include "monitor/monitor.h" -#include "monitor/hmp-target.h" #include "monitor/hmp.h" #include "qobject/qdict.h" #include "qapi/error.h" diff --git a/target/i386/sev-system-stub.c b/target/i386/sev-system-stub.c index 2ea85597cf9..d97536cca1c 100644 --- a/target/i386/sev-system-stub.c +++ b/target/i386/sev-system-stub.c @@ -14,7 +14,6 @@ #include "qemu/osdep.h" #include "monitor/monitor.h" #include "monitor/hmp.h" -#include "monitor/hmp-target.h" #include "qapi/error.h" #include "sev.h" =20 diff --git a/target/i386/sev.c b/target/i386/sev.c index 261b6aaa37b..b44b5a1c2b9 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c @@ -40,7 +40,6 @@ #include "qom/object.h" #include "monitor/monitor.h" #include "monitor/hmp.h" -#include "monitor/hmp-target.h" #include "qapi/qapi-commands-misc-i386.h" #include "confidential-guest.h" #include "hw/i386/pc.h" diff --git a/target/m68k/monitor.c b/target/m68k/monitor.c index 94bb12833af..be7411edca6 100644 --- a/target/m68k/monitor.c +++ b/target/m68k/monitor.c @@ -8,7 +8,6 @@ #include "qemu/osdep.h" #include "cpu.h" #include "monitor/hmp.h" -#include "monitor/hmp-target.h" #include "monitor/monitor.h" =20 void hmp_info_tlb(Monitor *mon, const QDict *qdict) diff --git a/target/ppc/monitor.c b/target/ppc/monitor.c index 776a76602ea..7c88e0e2bda 100644 --- a/target/ppc/monitor.c +++ b/target/ppc/monitor.c @@ -7,9 +7,7 @@ */ =20 #include "qemu/osdep.h" -#include "qemu/ctype.h" #include "monitor/monitor.h" -#include "monitor/hmp-target.h" #include "monitor/hmp.h" #include "cpu.h" =20 diff --git a/target/riscv/monitor.c b/target/riscv/monitor.c index 3898595a3cb..63806002417 100644 --- a/target/riscv/monitor.c +++ b/target/riscv/monitor.c @@ -25,7 +25,6 @@ #include "cpu_bits.h" #include "monitor/monitor.h" #include "monitor/hmp.h" -#include "monitor/hmp-target.h" #include "system/memory.h" #include "internals.h" =20 diff --git a/target/sh4/monitor.c b/target/sh4/monitor.c index 2da6a5426eb..50324d3600c 100644 --- a/target/sh4/monitor.c +++ b/target/sh4/monitor.c @@ -24,7 +24,6 @@ #include "qemu/osdep.h" #include "cpu.h" #include "monitor/monitor.h" -#include "monitor/hmp-target.h" #include "monitor/hmp.h" =20 static void print_tlb(Monitor *mon, int idx, tlb_t *tlb) diff --git a/target/sparc/monitor.c b/target/sparc/monitor.c index a60671a60a4..99abddbf1e0 100644 --- a/target/sparc/monitor.c +++ b/target/sparc/monitor.c @@ -24,7 +24,6 @@ #include "qemu/osdep.h" #include "cpu.h" #include "monitor/monitor.h" -#include "monitor/hmp-target.h" #include "monitor/hmp.h" =20 =20 diff --git a/target/xtensa/monitor.c b/target/xtensa/monitor.c index fbf60d55530..2af84934f83 100644 --- a/target/xtensa/monitor.c +++ b/target/xtensa/monitor.c @@ -24,7 +24,6 @@ #include "qemu/osdep.h" #include "cpu.h" #include "monitor/monitor.h" -#include "monitor/hmp-target.h" #include "monitor/hmp.h" =20 void hmp_info_tlb(Monitor *mon, const QDict *qdict) --=20 2.53.0