From nobody Sat Apr 11 18:34:37 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=1775850976; cv=none; d=zohomail.com; s=zohoarc; b=EgzO96K0yh0X8tCD67I6dgRs6JMc0yooqSIYkgk6lSjR6TKiKqnl0EDT/Vb5aFBvj0oBkYo4a/BZ2wKKBs0pwET9IfnnXMPLpfavg7aICvbM0IOPh8HHSL/oOLnQbCdRLwGAOWfawxborTuYcio6abq0rgV4VrRog1PWi3oSEDM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775850976; h=Content-Type:Content-Transfer-Encoding:Cc:Cc: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; bh=Lliv5w5ANZiNvmNx2mtJSUDbcwDuEoJ/CNkgnVy9fPs=; b=UE18OYpozdH6mcI6fVdH37gnu8Bd9eFwuntGlCCUeWAqRewMNXpV+eKWqEcBcxzeK6HBauN/JWPihAUyCgyXvXe/Ii4zMvNOjgLDkyOEIj6DaFXTBiG2HHvYmphqlp94G0hpfijMwi1cx77BF7/aZzmgYfUrZY9k3AMZD1qaMqY= 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 lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775850976450725.9070697709695; Fri, 10 Apr 2026 12:56:16 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHvW-0000GF-1x; Fri, 10 Apr 2026 15:54:02 -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 1wBHvU-0000Eg-3v for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:54:00 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wBHvR-00014n-1x for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:53:59 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4887f49ec5aso29125335e9.1 for ; Fri, 10 Apr 2026 12:53:56 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488d531f229sm129543465e9.3.2026.04.10.12.53.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 10 Apr 2026 12:53:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1775850835; x=1776455635; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Lliv5w5ANZiNvmNx2mtJSUDbcwDuEoJ/CNkgnVy9fPs=; b=fgyVmgI1RvlQ1qYMMLWJpmisAm1e/D21uIVfDjWVq45RvKrYo9MjNzxCqzEXHG5mO4 7cGUXgtESEyw7oQs6EMm+eqcqC6rUYTl/4u4XB+q36srcQwzCRj1UYNwVISEQBaCWWR/ g4+5y7t7QXVJI2KAvX6AFdMUG/joRGl7Rme1S8MqA63OWEkIErpUleXGFSpZgm5laeOI tWyyqCuh1ifwGFgnm9Sjpv82+bVuoHcCXLmTLhcIXXYTw7kopl/e0vboNOpB+6gOQjBh ohSayI0oXAeUWTNMnR7qjY7/aKxeRxp2XQQ1VgTP5GvXxlEO1n0PcKwQN3gOgiKFaMM6 rz0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775850835; x=1776455635; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Lliv5w5ANZiNvmNx2mtJSUDbcwDuEoJ/CNkgnVy9fPs=; b=SxYIJyZCbF2ve48mumHG7lYvL/b6TLY0rEzGFtXu5gV4Mj7ksg6qEz4fmOXvz1Y+wt Wl2JIrgbroWvwbjTW50ygvTAKUNdSWei6GexkaM/ITAvV4SXmIIAQSKVE7qxLif/TI3u zT4aKssGixGgSIcTt4Ix9iImzxVDfafCOnHdSnnDriHtLQRWowyn6hITnDY095tKyJha +Av7eOfrv6QWlEGXFcdS5XmtEuKEUm9Qmf6RDS3M8B1+NyNm1GzSXtZ81nNPnfjjiLJw Ezthm6QIYIAsy+1Aivm1PsKgV3sA82feGaQMDWT7mOpYqtG/vf4xt/ItKDdctAzJxMGi jm6A== X-Gm-Message-State: AOJu0YzE+tIQP0pH2Be+aV+brBX0tdoBBKSzXdFeLQ8mtj6HEzclGyVN QlvhpLCyx+RT4NMGdurQWXy6135KPWOYl9TgVXuNuJD2Qjj50ZsFHyAQErE7NesAIfVXuBo6UCb xOlwfYkE= X-Gm-Gg: AeBDiesCeB7/+XWPI9wv1qcN14VObZ0PaMzF9jz16OToeGOyZ8uLbsgeuDzqYgfnivV GWtMheudAwKyiaZ01CKuaQpLFTTRG424v+nbyy/mnsCGjFXoDdgxzqBrXlvr+4Q9xACWmwo065i 7wE5kg0hm1/kpTROcxqKaw/65qvFZPNy/Vn+TXn7I5b0r6FcgKolKjznXVPiC4X0ivTFuQ7K2Ik 88ZIncSu0ccRtdRXSCxPHzGs3jOE1CcgFrRMXOqvAiGbqvdoUeBaJ0o39cK8WQ5VDtTixeMXsTs 9iqxaHsmooPk7A4frK3a0qg8FuRefo0++i646Oc+zha9PUkJYkOw/cZlGq9tpF7nfjZxMedriQc kgLH0nra80hgb/CbY7d88flnokpCUMdcNXQyI1/3WUfS3VFWtautM9G5EGPR5HzL7/ECTTZyoi4 1rfxa45sfylPoMJSU4J/DCuVxjcpgY5QywFRDon9sLEQJiUTSdQ+OZSBwLGirICWqF43ZAoCvq4 vwG5c74AUw= X-Received: by 2002:a05:600c:8b30:b0:488:b14f:b8ed with SMTP id 5b1f17b1804b1-488d6657928mr61369125e9.0.1775850835153; Fri, 10 Apr 2026 12:53:55 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , "Dr. David Alan Gilbert" , Pierrick Bouvier , qemu-riscv@nongnu.org, Markus Armbruster , qemu-s390x@nongnu.org, kvm@vger.kernel.org, qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paolo Bonzini , Marcelo Tosatti , "Michael S. Tsirkin" , Marcel Apfelbaum , Zhao Liu , Laurent Vivier , Nicholas Piggin , Chinmay Rath , Glenn Miles , Palmer Dabbelt , Alistair Francis , Weiwei Li , Daniel Henrique Barboza , Liu Zhiwei , Chao Liu , Yoshinori Sato , Mark Cave-Ayland , Artyom Tarasenko , Max Filippov Subject: [PATCH v2 04/27] monitor: Remove 'monitor/hmp-target.h' header Date: Fri, 10 Apr 2026 21:52:58 +0200 Message-ID: <20260410195323.17937-5-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: 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=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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=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 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: 1775850979413154100 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 --- MAINTAINERS | 1 - include/monitor/hmp-target.h | 42 ----------------------------------- include/monitor/hmp.h | 12 ++++++++++ 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, 13 insertions(+), 60 deletions(-) delete mode 100644 include/monitor/hmp-target.h diff --git a/MAINTAINERS b/MAINTAINERS index 535d1d3398e..edbbd544d62 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3411,7 +3411,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 6364c94edf8..00000000000 --- a/include/monitor/hmp-target.h +++ /dev/null @@ -1,42 +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 struct MonitorDef *md, int of= fset); -}; - -const MonitorDef *target_monitor_defs(void); -int target_get_monitor_def(CPUState *cs, const char *name, uint64_t *pval); - -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 9c2330205fc..f17a50a3fed 100644 --- a/include/monitor/hmp.h +++ b/include/monitor/hmp.h @@ -17,6 +17,18 @@ #include "qemu/readline.h" #include "qapi/qapi-types-common.h" =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); +int target_get_monitor_def(CPUState *cs, const char *name, uint64_t *pval); + +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 1dd8d9afbfa..6e82773a86d 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 c840ae5f0a2..d07e545ef7e 100644 --- a/monitor/hmp-target.c +++ b/monitor/hmp-target.c @@ -27,7 +27,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 20ba1e62988..983048db1b9 100644 --- a/monitor/hmp.c +++ b/monitor/hmp.c @@ -27,7 +27,6 @@ #include "hw/core/qdev.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 b128334e571..ddc666d3451 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 fb84aee94d2..f799a338d60 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 9dde972c118..97e745f27c4 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c @@ -39,7 +39,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 a9d31114442..3f206b9fca5 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" =20 #ifdef TARGET_RISCV64 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