From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: laurent@vivier.eu,
"Dr. David Alan Gilbert \(git\)" <dgilbert@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [PATCH 08/11] mos6522: add "info via" HMP command for debugging
Date: Mon, 21 Feb 2022 17:11:48 +0000 [thread overview]
Message-ID: <YhPH1BYRetB0Ks9C@redhat.com> (raw)
In-Reply-To: <21104b5a-c895-337c-619d-e880836d5895@ilande.co.uk>
On Sun, Feb 20, 2022 at 05:18:33PM +0000, Mark Cave-Ayland wrote:
> On 08/02/2022 13:10, Daniel P. Berrangé wrote:
>
> > On Tue, Feb 08, 2022 at 01:06:59PM +0000, Mark Cave-Ayland wrote:
> > > On 08/02/2022 12:49, Daniel P. Berrangé wrote:
> > >
> > > > > I was under the impression that monitor_register_hmp_info_hrt() does all the
> > > > > magic here i.e. it declares the underlying QMP command with an x- prefix and
> > > > > effectively encapsulates the text field in a way that says "this is an
> > > > > unreliable text opaque for humans"?
> > > >
> > > > The monitor_register_hmp_info_hrt only does the HMP glue side, and
> > > > that's only needed if you must dynamically register the HMP command.
> > > > For statically registered commands set '.cmd_info_hrt' directly in
> > > > the hml-commands-info.hx for the HMP side.
> > > >
> > > > > If a qapi/ schema is needed could you explain what it should look like for
> > > > > this example and where it should go? Looking at the existing .json files I
> > > > > can't immediately see one which is the right place for this to live.
> > > >
> > > > Take a look in qapi/machine.json for anyof the 'x-query-XXXX' commands
> > > > there. The QAPI bit is fairly simple.
> > > >
> > > > if you want to see an illustration of what's different from a previous
> > > > pure HMP impl, look at:
> > > >
> > > > commit dd98234c059e6bdb05a52998270df6d3d990332e
> > > > Author: Daniel P. Berrangé <berrange@redhat.com>
> > > > Date: Wed Sep 8 10:35:43 2021 +0100
> > > >
> > > > qapi: introduce x-query-roms QMP command
> > >
> > > I see, thanks for the reference. So qapi/machine.json would be the right
> > > place to declare the QMP part even for a specific device?
> > >
> > > Even this approach still wouldn't work in its current form though, since as
> > > mentioned in my previous email it seems that only the target CONFIG_*
> > > defines and not the device CONFIG_* defines are present when processing
> > > hmp-commands-info.hx.
> >
> > Yeah, that's where the pain comes in. While QAPI schema can be made
> > conditional on a few CONFIG_* parameters - basically those derived
> > from global configure time options, it is impossible for this to be
> > with with target specific options like the device CONFIG_* defines.
> >
> > This is why I suggested in my othuer reply that it would need to be
> > done with a generic 'info dev-debug' / 'x-query-dev-debug' command
> > that can be registered unconditionally, and then individual devices
> > plug into it.
>
> After some more experiments this afternoon I still seem to be falling
> through the gaps on this one. This is based upon my understanding that all
> new HMP commands should use a QMP HumanReadableText implementation and the
> new command should be restricted according to target.
>
> Currently I am working with this change to hmp-commands-info.hx and
> qapi/misc-target.json:
[snip]
> i.e. qmp_marshal_output_HumanReadableText() isn't protected by the #if
> TARGET guards and since HumanReadableText is only used by the new
> qmp_x_query_via() functionality then the compiler complains and aborts the
> compilation.
>
> Possibly this is an error in the QAPI generator for types hidden behind
> commands using "if"? Otherwise I'm not sure what is the best way to proceed,
> so I'd be grateful for some further pointers.
Yes, this is pretty much what I expect and exactly what I hit with
other target specific commands.
That's why I suggested something like a general 'x-device-debug' command
that is NOT conditionalized in QAPI, against which dev impls can register
a callback to provide detailed reporting, instead of a device type specific
command.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2022-02-21 17:18 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-27 20:53 [PATCH 00/11] mos6522: switch to gpios, add control line edge-triggering and extra debugging Mark Cave-Ayland
2022-01-27 20:53 ` [PATCH 01/11] mos6522: add defines for IFR bit flags Mark Cave-Ayland
2022-01-27 23:16 ` BALATON Zoltan
2022-02-05 10:51 ` Mark Cave-Ayland
2022-02-05 11:16 ` Philippe Mathieu-Daudé via
2022-02-05 12:06 ` BALATON Zoltan
2022-02-20 10:53 ` Mark Cave-Ayland
2022-02-20 19:21 ` BALATON Zoltan
2022-01-27 20:53 ` [PATCH 02/11] mac_via: use IFR bit flag constants for VIA1 IRQs Mark Cave-Ayland
2022-01-27 20:53 ` [PATCH 03/11] mac_via: use IFR bit flag constants for VIA2 IRQs Mark Cave-Ayland
2022-01-27 20:53 ` [PATCH 04/11] mos6522: switch over to use qdev gpios for IRQs Mark Cave-Ayland
2022-02-07 19:29 ` Peter Maydell
2022-02-20 11:01 ` Mark Cave-Ayland
2022-01-27 20:53 ` [PATCH 05/11] mos6522: remove update_irq() and set_sr_int() methods from MOS6522DeviceClass Mark Cave-Ayland
2022-02-07 19:30 ` Peter Maydell
2022-01-27 20:54 ` [PATCH 06/11] mos6522: use device_class_set_parent_reset() to propagate reset to parent Mark Cave-Ayland
2022-02-07 19:31 ` Peter Maydell
2022-01-27 20:54 ` [PATCH 07/11] mos6522: add register names to register read/write trace events Mark Cave-Ayland
2022-02-07 19:32 ` Peter Maydell
2022-01-27 20:54 ` [PATCH 08/11] mos6522: add "info via" HMP command for debugging Mark Cave-Ayland
2022-02-07 19:34 ` Peter Maydell
2022-02-08 5:14 ` Philippe Mathieu-Daudé via
2022-02-08 8:10 ` Markus Armbruster
2022-02-08 10:29 ` Dr. David Alan Gilbert
2022-02-08 11:52 ` Daniel P. Berrangé
2022-02-08 12:43 ` Mark Cave-Ayland
2022-02-08 13:03 ` Dr. David Alan Gilbert
2022-02-08 15:13 ` Markus Armbruster
2022-02-08 12:32 ` Mark Cave-Ayland
2022-02-08 13:04 ` Dr. David Alan Gilbert
2022-02-08 11:38 ` Daniel P. Berrangé
2022-02-08 12:39 ` Mark Cave-Ayland
2022-02-08 12:49 ` Daniel P. Berrangé
2022-02-08 13:06 ` Mark Cave-Ayland
2022-02-08 13:10 ` Daniel P. Berrangé
2022-02-20 17:18 ` Mark Cave-Ayland
2022-02-21 12:20 ` Philippe Mathieu-Daudé
2022-02-21 22:27 ` Mark Cave-Ayland
2022-02-21 17:11 ` Daniel P. Berrangé [this message]
2022-02-21 22:29 ` Mark Cave-Ayland
2022-02-22 15:03 ` Dr. David Alan Gilbert
2022-02-24 12:26 ` Mark Cave-Ayland
2022-01-27 20:54 ` [PATCH 09/11] mos6522: record last_irq_levels in mos6522_set_irq() Mark Cave-Ayland
2022-01-27 20:54 ` [PATCH 10/11] mos6522: implement edge-triggering for CA1/2 and CB1/2 control line IRQs Mark Cave-Ayland
2022-01-27 20:54 ` [PATCH 11/11] macio/pmu.c: remove redundant code Mark Cave-Ayland
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=YhPH1BYRetB0Ks9C@redhat.com \
--to=berrange@redhat.com \
--cc=dgilbert@redhat.com \
--cc=laurent@vivier.eu \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=qemu-devel@nongnu.org \
/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.