Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E8B153770B for ; Tue, 14 Apr 2026 00:32:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776126753; cv=none; b=qdIB86ASFDAJEUwBX8vBHFxLO5Ucosa87nKjJu6fA8pTd556aulwd+jazk4Hgym61JZC6GFvw3RTKs2pmQSgPdTOO+FWKLXfiMpaf7DOkfkSeIG/7MfYqwRENCP2suvPfhEZt4UBn16eBnrjcQiUChgjHdjpjIz86viVlQ/gGcM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776126753; c=relaxed/simple; bh=7kc/kQwLIYrQUV/gISjQ/YICoB5Ner41EdFIQzXALcQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=stk2j4PyzvdNZEbUXaYjuTUKU0MvxlKg0NJMZQf9Tc8Td7ZD5rfe12or91QUYOSIUMMaCHNmbO8GFRyXmix1fNaWnTAgn6FlXu+1uCz4scWTs7P0bdxkK1aBxuC0N1J1Mz4oQI/fBmnuTv1mNucXyJE8Q6uii/yrXOh/s3lT+cw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=F4S+z0Ep; arc=none smtp.client-ip=209.85.128.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="F4S+z0Ep" Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-488b00ed86fso51873995e9.3 for ; Mon, 13 Apr 2026 17:32:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1776126750; x=1776731550; darn=vger.kernel.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=GQw0sqD4HWji1OvXTjA/TSCdlWVBswvkpmTeaVjGoNA=; b=F4S+z0EplnY+kbQD8GnBNcHn1JaQq+NamBTR7gVBpn064wKbA2LsDQHkeXeDzGQPa+ AAzzzYSna3OPfQGGRhkEQAABPqBB5b8HtIGNVXJIfGgGMpg0yXLSL/vwxx4XYkxsHPnJ F7J7x/RKaZ1KNOJahbn67oIuph/7Q7v4k3oEEtb1KI4s86SHNd9NKgEbmAgFPZ/fqr1Y gOQg0bYC1l1bPLmYSkz8oCBPkFVIoKQYhlYaCxR3NL0Qt+k+0lVZrmLB7Lw4PNJbzG2j MhdiASxtwsVkw++4Arc50Ne1RfSnoIFJtgZcShLe09vrI4iNn7poY8MR5syBmV8FH5hq n3Kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776126750; x=1776731550; 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=GQw0sqD4HWji1OvXTjA/TSCdlWVBswvkpmTeaVjGoNA=; b=CCjSQcsEkshLLLg6RAFxQJm3ZywZ/RyDfns6vjwfNakNzHpvwzwEWu/lP6hHN2ACZf LA9Dzv3aDrrlSefqhFwpodGK+afPlu0CtrTCTvLQ22oTImCJevkd/O+aD4myimteFN29 6Cw5bICRSuax/LB2uH59TYSBSQpUj0Dh3igdR4zsWRsqKQ2e7E0VyHxqoQ+9AwvpjH3e G/Z6R6qnMNjvrgK+VsBCAFBzRFfi457b7y83PAgurIcg5/a+uenJROsZuBy78wI5u8FT AcQQauvrHVA9GXcS/HBeuWkMX0MCq8AmdSxOt9hoL8BJ7lAmQqCx7PrlyOW9DjT+YtHg wuqQ== X-Forwarded-Encrypted: i=1; AFNElJ9bifBL1wIQhc61U135Y52N2LIUqdQbHoWgixEUyu5dFN/UKTPkIfhH6j8a6WtrdN7cSKQ=@vger.kernel.org X-Gm-Message-State: AOJu0Yz5cImct81fR6jG11zDxTuhjay8QPLoEO3KtFVplUyAcy7XdXIQ HnFM3I7VHjBUXSKEWs7vkkF4H/x151X1VjPdxafJ4pcTjrwjnqHFypFtrTVn5o3iPII= X-Gm-Gg: AeBDieuj2wNOzCXVuFn0WlgEJlEtotQnaT0eq8OiFzPFYYTBZfv+MirdzmPklaRNQRy nggQSGxZxNJSgkUY/ACxps3x6NaL90PktBec6BVFbbGRu68iXIzpeWfgpf7z3L7rS3uDtXVSvkF pFOpQ7LeqJjNC7+/y2L4aZsw2YA3Wtnec9Jj5t5dosrsjXClr5aoE3RNgQt7UW6tHwnS6RCdkYH BzGeK0EgcUqaPgBlL6Kws5SObI/9uW396Fkk8CrqTJKq9m+UICpdyyBPgOX3CflRy4tCguv2FR1 Snvxqgukn9/NCZdBBWXI4bzJYZzffPZ4kx80EaUUQUSy8f8UO07rXqvUZd6gnckxV2jx5im44Mn hY8qEZV6js5E9cLg/wItKDzki/MxiTYM8++dSL4nCY8VAEEtn1BYj0sJQJ7K3svNEvYJPpDiRAa u24rwzpO7UzokBWlK6PF8Hke50tDo0zPKBJz+BoSAaFDanncRIaA/VKdGr1SjKhS1nhGYHKY9L X-Received: by 2002:a05:600c:8b2f:b0:485:3423:727d with SMTP id 5b1f17b1804b1-488d688d46cmr197075255e9.26.1776126750155; Mon, 13 Apr 2026 17:32:30 -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-488d5d85ae9sm148749875e9.3.2026.04.13.17.32.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 13 Apr 2026 17:32:29 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Markus Armbruster , Richard Henderson , "Dr. David Alan Gilbert" , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , 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 , kvm@vger.kernel.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org Subject: [PATCH v3 20/27] monitor: Remove 'monitor/hmp-target.h' header Date: Tue, 14 Apr 2026 02:29:52 +0200 Message-ID: <20260414003001.97571-21-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260414003001.97571-1-philmd@linaro.org> References: <20260414003001.97571-1-philmd@linaro.org> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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é Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Richard Henderson --- 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 580a80ab254..5dcd24a8a89 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3421,7 +3421,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"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * 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 OTHER - * 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(); \ } +typedef struct MonitorDef { + const char *name; + int offset; + int64_t (*get_value)(Monitor *mon, const struct MonitorDef *md, int offset); +} 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" 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" 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" 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 @@ */ #include "qemu/osdep.h" -#include "qemu/ctype.h" #include "monitor/monitor.h" -#include "monitor/hmp-target.h" #include "monitor/hmp.h" #include "cpu.h" diff --git a/target/riscv/monitor.c b/target/riscv/monitor.c index 00a68c26abc..a6250bcccca 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" 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" 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" 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" void hmp_info_tlb(Monitor *mon, const QDict *qdict) -- 2.53.0