All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dave@treblig.org>
To: Markus Armbruster <armbru@redhat.com>
Cc: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
	qemu-devel@nongnu.org,
	"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	qemu-riscv@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Eduardo Habkost" <eduardo@habkost.net>,
	"Zhao Liu" <zhao1.liu@intel.com>,
	"Marcelo Tosatti" <mtosatti@redhat.com>,
	"Laurent Vivier" <laurent@vivier.eu>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Alistair Francis" <alistair.francis@wdc.com>,
	"Weiwei Li" <liwei1518@gmail.com>,
	"Daniel Henrique Barboza" <dbarboza@ventanamicro.com>,
	"Liu Zhiwei" <zhiwei_liu@linux.alibaba.com>,
	"Yoshinori Sato" <yoshinori.sato@nifty.com>,
	"Max Filippov" <jcmvbkbc@gmail.com>,
	kvm@vger.kernel.org
Subject: Re: [PATCH 2/2] monitor/hmp: Reduce target-specific definitions
Date: Sun, 11 Jan 2026 14:11:31 +0000	[thread overview]
Message-ID: <aWOvk527PkZzLtSp@gallifrey> (raw)
In-Reply-To: <87jyxsczyk.fsf@pond.sub.org>

* Markus Armbruster (armbru@redhat.com) wrote:
> Philippe Mathieu-Daudé <philmd@linaro.org> writes:
> 
> > From "monitor/hmp-target.h", only the MonitorDef structure
> > is target specific (by using the 'target_long' type). All
> > the rest (even target_monitor_defs and target_get_monitor_def)
> > can be exposed to target-agnostic units, allowing to build
> > some of them in meson common source set.
> >
> > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> 
> The only use of the ->get_value() callback I can see is in
> get_monitor_def(), to implement HMP's $register feature.  I can't see
> the callback being set.  Is it dead?

I think I see that being used in ppc;
target/ppc/ppc-qmp-cmds.c

const MonitorDef monitor_defs[] = {
    { "fpscr", offsetof(CPUPPCState, fpscr) },
    /* Next instruction pointer */
    { "nip|pc", offsetof(CPUPPCState, nip) },
    { "lr", offsetof(CPUPPCState, lr) },
    { "ctr", offsetof(CPUPPCState, ctr) },
    { "decr", 0, &monitor_get_decr, },
    { "ccr|cr", 0, &monitor_get_ccr, },
    /* Machine state register */
    { "xer", 0, &monitor_get_xer },
    { "msr", offsetof(CPUPPCState, msr) },
    { "tbu", 0, &monitor_get_tbu, },
#if defined(TARGET_PPC64)
    { "tb", 0, &monitor_get_tbl, },
#else
    { "tbl", 0, &monitor_get_tbl, },
#endif
    { NULL },
};

those monitor_get_* functions are that get_value() aren't they?

Dave

-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/

  reply	other threads:[~2026-01-11 14:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-07 18:20 [PATCH 0/2] monitor/hmp: Reduce target-specific definitions Philippe Mathieu-Daudé
2026-01-07 18:20 ` [PATCH 1/2] target/i386: Include missing 'svm.h' header in 'sev.h' Philippe Mathieu-Daudé
2026-01-07 18:20 ` [PATCH 2/2] monitor/hmp: Reduce target-specific definitions Philippe Mathieu-Daudé
2026-01-08  7:42   ` Markus Armbruster
2026-01-11 14:11     ` Dr. David Alan Gilbert [this message]
2026-01-12  7:00       ` Markus Armbruster
2026-01-12  7:06   ` Markus Armbruster
2026-01-08  0:37 ` [PATCH 0/2] " Pierrick Bouvier

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=aWOvk527PkZzLtSp@gallifrey \
    --to=dave@treblig.org \
    --cc=alistair.francis@wdc.com \
    --cc=armbru@redhat.com \
    --cc=dbarboza@ventanamicro.com \
    --cc=eduardo@habkost.net \
    --cc=jcmvbkbc@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=laurent@vivier.eu \
    --cc=liwei1518@gmail.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=palmer@dabbelt.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=pierrick.bouvier@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=yoshinori.sato@nifty.com \
    --cc=zhao1.liu@intel.com \
    --cc=zhiwei_liu@linux.alibaba.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.