public inbox for qemu-devel@nongnu.org
 help / color / mirror / Atom feed
From: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>, qemu-devel@nongnu.org
Cc: Pierrick Bouvier <pierrick.bouvier@linaro.org>,
	"Dr . David Alan Gilbert" <dave@treblig.org>,
	Alistair Francis <alistair.francis@wdc.com>,
	Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	Artyom Tarasenko <atar4qemu@gmail.com>,
	Zhao Liu <zhao1.liu@intel.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	qemu-riscv@nongnu.org, Anton Johansson <anjo@rev.ng>
Subject: Re: [PATCH-for-11.1 00/10] monitor: Remove need of per-target handlers
Date: Mon, 23 Mar 2026 09:03:01 -0300	[thread overview]
Message-ID: <ef1abb04-d456-4bfb-bf0d-ea1e1fbb1737@oss.qualcomm.com> (raw)
In-Reply-To: <20260320160811.28611-1-philmd@linaro.org>



On 3/20/2026 1:08 PM, Philippe Mathieu-Daudé wrote:
> Convert target_monitor_defs() and target_monitor_defs()
> to CPUClass fields, adapting the 4 targets using these
> legacy code.

So I saw in patch 3 this explanation:


+ * @legacy_monitor_defs: Array of MonitorDef entries. This field is legacy,
+ *                       use @gdb_core_xml_file to dump registers instead.


I can move target/riscv to gdb_core_xml_file and get out of your way in
deprecating this API so you have one less target to worry about.  I'll
see what other targets are doing w.r.t gdb_core_xml_file.

In fact, depending on the amount of pain involved, we should just convert
all targets and remove the legacy API completely.  Or maybe I'm not fully
appreciating the scope of what you're doing here: will we impact users if
we just convert all users to gdb_core_xml_file?  Do we have HMP/QMP commands
that will be impacted?  Because if not we should consider just convert everything
and be done with it - there's not 'turn legacy for a couple of releases
before removing it' for internals APIs.


Thanks,
Daniel

> 
> Philippe Mathieu-Daudé (10):
>    monitor: Extract completion declarations to 'monitor/hmp-completion.h'
>    monitor: Forward-declare the MonitorDef type
>    cpus: Introduce CPUClass::legacy_monitor_defs hook
>    target/i386: Replace legacy target_monitor_defs -> legacy_monitor_defs
>    target/m68k: Replace legacy target_monitor_defs -> legacy_monitor_defs
>    target/sparc: Replace legacy target_monitor_defs ->
>      legacy_monitor_defs
>    monitor: Remove target_monitor_defs()
>    cpus: Introduce CPUClass::legacy_monitor_get_register() hook
>    target/riscv: Register target_get_monitor_def in CPUClass
>    monitor: Remove target_get_monitor_def()
> 
>   MAINTAINERS                      |  1 +
>   include/hw/core/cpu.h            |  8 +++++++
>   include/monitor/hmp-completion.h | 40 ++++++++++++++++++++++++++++++++
>   include/monitor/hmp.h            | 28 ++--------------------
>   include/qemu/typedefs.h          |  1 +
>   target/i386/cpu.h                |  2 ++
>   target/m68k/cpu.h                |  2 ++
>   target/riscv/internals.h         |  3 +++
>   target/sparc/cpu.h               |  2 ++
>   chardev/char-hmp-cmds.c          |  1 +
>   migration/migration-hmp-cmds.c   |  1 +
>   monitor/hmp-target.c             |  1 +
>   monitor/hmp.c                    |  8 +++++--
>   net/net-hmp-cmds.c               |  1 +
>   qom/qom-hmp-cmds.c               |  1 +
>   stubs/target-get-monitor-def.c   | 29 -----------------------
>   stubs/target-monitor-defs.c      |  7 ------
>   system/qdev-monitor.c            |  1 +
>   system/runstate-hmp-cmds.c       |  1 +
>   target/i386/cpu.c                |  1 +
>   target/i386/monitor.c            |  7 ++----
>   target/m68k/cpu.c                |  1 +
>   target/m68k/monitor.c            |  5 +---
>   target/riscv/cpu.c               |  1 +
>   target/riscv/monitor.c           |  4 +++-
>   target/sparc/cpu.c               |  3 +++
>   target/sparc/monitor.c           |  9 +++----
>   trace/trace-hmp-cmds.c           |  1 +
>   ui/ui-hmp-cmds.c                 |  1 +
>   stubs/meson.build                |  2 --
>   30 files changed, 91 insertions(+), 82 deletions(-)
>   create mode 100644 include/monitor/hmp-completion.h
>   delete mode 100644 stubs/target-get-monitor-def.c
>   delete mode 100644 stubs/target-monitor-defs.c
> 



      parent reply	other threads:[~2026-03-23 12:03 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-20 16:08 [PATCH-for-11.1 00/10] monitor: Remove need of per-target handlers Philippe Mathieu-Daudé
2026-03-20 16:08 ` [PATCH-for-11.1 01/10] monitor: Extract completion declarations to 'monitor/hmp-completion.h' Philippe Mathieu-Daudé
2026-03-20 21:52   ` Pierrick Bouvier
2026-03-20 16:08 ` [PATCH-for-11.1 02/10] monitor: Forward-declare the MonitorDef type Philippe Mathieu-Daudé
2026-03-20 21:52   ` Pierrick Bouvier
2026-03-20 16:08 ` [PATCH-for-11.1 03/10] cpus: Introduce CPUClass::legacy_monitor_defs hook Philippe Mathieu-Daudé
2026-03-20 22:01   ` Pierrick Bouvier
2026-03-21 15:19     ` Philippe Mathieu-Daudé
2026-03-21 19:51       ` Pierrick Bouvier
2026-03-23  9:19         ` Philippe Mathieu-Daudé
2026-03-23 20:00           ` Pierrick Bouvier
2026-03-20 16:08 ` [PATCH-for-11.1 04/10] target/i386: Replace legacy target_monitor_defs -> legacy_monitor_defs Philippe Mathieu-Daudé
2026-03-20 16:08 ` [PATCH-for-11.1 05/10] target/m68k: " Philippe Mathieu-Daudé
2026-03-20 16:08 ` [PATCH-for-11.1 06/10] target/sparc: " Philippe Mathieu-Daudé
2026-03-20 16:08 ` [PATCH-for-11.1 07/10] monitor: Remove target_monitor_defs() Philippe Mathieu-Daudé
2026-03-20 16:08 ` [PATCH-for-11.1 08/10] cpus: Introduce CPUClass::legacy_monitor_get_register() hook Philippe Mathieu-Daudé
2026-03-20 16:08 ` [PATCH-for-11.1 09/10] target/riscv: Register target_get_monitor_def in CPUClass Philippe Mathieu-Daudé
2026-03-20 16:08 ` [PATCH-for-11.1 10/10] monitor: Remove target_get_monitor_def() Philippe Mathieu-Daudé
2026-03-23 12:03 ` Daniel Henrique Barboza [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ef1abb04-d456-4bfb-bf0d-ea1e1fbb1737@oss.qualcomm.com \
    --to=daniel.barboza@oss.qualcomm.com \
    --cc=alistair.francis@wdc.com \
    --cc=anjo@rev.ng \
    --cc=atar4qemu@gmail.com \
    --cc=dave@treblig.org \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=pierrick.bouvier@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=zhao1.liu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox