All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Daniel Henrique Barboza <danielhb413@gmail.com>
Cc: qemu-devel@nongnu.org,
	Alistair Francis <alistair.francis@wdc.com>,
	David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [PATCH for-7.2 00/10] add hmp 'save-fdt' and 'info fdt' commands
Date: Mon, 25 Jul 2022 10:11:00 +0100	[thread overview]
Message-ID: <Yt5eJDhwdQclX5fY@redhat.com> (raw)
In-Reply-To: <20220722200007.1602174-1-danielhb413@gmail.com>

On Fri, Jul 22, 2022 at 04:59:57PM -0300, Daniel Henrique Barboza wrote:
> Hi,
> 
> After dealing with a FDT element that isn't being shown in the userspace
> and having to shutdown the guest, dump the FDT using 'machine -dumpdtb' and
> then using 'dtc' to see what was inside the FDT, I thought it was a good
> idea to add extra support for FDT handling in QEMU.
> 
> This series introduces 2 commands. 'fdt-save' behaves similar to what
> 'machine -dumpdtb' does, with the advantage of saving the FDT of a running
> guest on demand. This command is implemented in patch 03.
> 
> The second command, 'info fdt <command>' is more sophisticated. This
> command can print specific nodes and properties of the FDT. A few
> examples:
> 
> - print the /cpus/cpu@0 from an ARM 'virt' machine:
> 
> (qemu) info fdt /cpus/cpu@0
> /cpus/cpu@0 {
>     phandle = <0x8001>
>     reg = <0x0>
>     compatible = 'arm,cortex-a57'
>     device_type = 'cpu'
> }
> (qemu) 
> 
> - print the device_type property of the interrupt-controller node of a
> pSeries machine:
> 
> (qemu) info fdt /interrupt-controller/device_type
> /interrupt-controller/device_type = 'PowerPC-External-Interrupt-Presentation'
> (qemu)

Please don't add new HMP-only commands. These should be provided
as QMP commands, where the HMP is a tiny shim to the QMP.

If you don't want to think about formally modelling the data
for 'info fdt' / 'query-fdt', then just put an 'x-' prefix on
the QMP command and return printed formatted data, as illustrated
in:

https://www.qemu.org/docs/master/devel/writing-monitor-commands.html#writing-a-debugging-aid-returning-unstructured-text

With 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 :|



  parent reply	other threads:[~2022-07-25  9:13 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-22 19:59 [PATCH for-7.2 00/10] add hmp 'save-fdt' and 'info fdt' commands Daniel Henrique Barboza
2022-07-22 19:59 ` [PATCH for-7.2 01/10] hw/arm/boot.c: do not free machine->fdt in arm_load_dtb() Daniel Henrique Barboza
2022-07-22 23:09   ` BALATON Zoltan
2022-07-22 19:59 ` [PATCH for-7.2 02/10] hw/ppc/pegasos2.c: set machine->fdt in machine_reset() Daniel Henrique Barboza
2022-07-22 23:11   ` BALATON Zoltan
2022-07-22 20:00 ` [PATCH for-7.2 03/10] hw/ppc: set machine->fdt in spapr machine Daniel Henrique Barboza
2022-07-22 20:00 ` [PATCH for-7.2 04/10] hmp, device_tree.c: introduce fdt-save Daniel Henrique Barboza
2022-07-22 23:13   ` BALATON Zoltan
2022-07-25 13:17     ` Daniel Henrique Barboza
2022-07-25 12:12   ` Dr. David Alan Gilbert
2022-07-22 20:00 ` [PATCH for-7.2 05/10] hmp, device_tree.c: introduce 'info fdt' command Daniel Henrique Barboza
2022-07-22 20:00 ` [PATCH for-7.2 06/10] device_tree.c: support printing of strings props Daniel Henrique Barboza
2022-07-22 20:00 ` [PATCH for-7.2 07/10] device_tree.c: support remaining FDT prop types Daniel Henrique Barboza
2022-07-22 20:00 ` [PATCH for-7.2 08/10] device_node.c: enable 'info fdt' to print subnodes Daniel Henrique Barboza
2022-07-22 20:00 ` [PATCH for-7.2 09/10] device_tree.c: add fdt_print_property() helper Daniel Henrique Barboza
2022-07-22 20:00 ` [PATCH for-7.2 10/10] hmp, device_tree.c: add 'info fdt <property>' support Daniel Henrique Barboza
2022-07-25 12:28   ` Dr. David Alan Gilbert
2022-07-22 23:16 ` [PATCH for-7.2 00/10] add hmp 'save-fdt' and 'info fdt' commands BALATON Zoltan
2022-07-25  9:11 ` Daniel P. Berrangé [this message]
2022-07-25 13:16   ` Daniel Henrique Barboza
2022-07-25 14:05     ` Daniel P. Berrangé

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=Yt5eJDhwdQclX5fY@redhat.com \
    --to=berrange@redhat.com \
    --cc=alistair.francis@wdc.com \
    --cc=danielhb413@gmail.com \
    --cc=david@gibson.dropbear.id.au \
    --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.