Hi, In this version I removed the 'info fdt' command. It didn't get enough traction/acceptance to justify the amount of code to implement it.
Aside from that, all other changes are based on Markus' feedback on patch 14. Changes from v4: - patches 15-21: removed - patch 14: - dumpdtb is now dependent on 'if: CONFIG_FDT' in qapi/machine.json - dumpdtb is now dependent on 'if defined(CONFIG_FDT)' in hmp-commands.hx - moved qmp_dumpdtb() and hmp_dumpdtb() to device_tree.c - added a GError pointer to g_file_set_contents() to report errors caught - hmp_handle_error() is now called unconditionally - v4 link: https://lists.gnu.org/archive/html/qemu-devel/2022-08/msg04115.html Daniel Henrique Barboza (14): hw/arm: do not free machine->fdt in arm_load_dtb() hw/microblaze: set machine->fdt in microblaze_load_dtb() hw/nios2: set machine->fdt in nios2_load_dtb() hw/ppc: set machine->fdt in ppce500_load_device_tree() hw/ppc: set machine->fdt in bamboo_load_device_tree() hw/ppc: set machine->fdt in sam460ex_load_device_tree() hw/ppc: set machine->fdt in xilinx_load_device_tree() hw/ppc: set machine->fdt in pegasos2_machine_reset() hw/ppc: set machine->fdt in pnv_reset() hw/ppc: set machine->fdt in spapr machine hw/riscv: set machine->fdt in sifive_u_machine_init() hw/riscv: set machine->fdt in spike_board_init() hw/xtensa: set machine->fdt in xtfpga_init() qmp/hmp, device_tree.c: introduce dumpdtb hmp-commands.hx | 15 +++++++++++++++ hw/arm/boot.c | 3 ++- hw/microblaze/boot.c | 8 +++++++- hw/microblaze/meson.build | 2 +- hw/nios2/boot.c | 8 +++++++- hw/nios2/meson.build | 2 +- hw/ppc/e500.c | 13 ++++++++++++- hw/ppc/pegasos2.c | 7 +++++++ hw/ppc/pnv.c | 8 +++++++- hw/ppc/ppc440_bamboo.c | 11 ++++++++++- hw/ppc/sam460ex.c | 5 ++++- hw/ppc/spapr.c | 6 ++++++ hw/ppc/spapr_hcall.c | 8 ++++++++ hw/ppc/virtex_ml507.c | 11 ++++++++++- hw/riscv/sifive_u.c | 6 ++++++ hw/riscv/spike.c | 9 +++++++++ hw/xtensa/meson.build | 2 +- hw/xtensa/xtfpga.c | 9 ++++++++- include/sysemu/device_tree.h | 1 + monitor/misc.c | 1 + qapi/machine.json | 18 ++++++++++++++++++ softmmu/device_tree.c | 31 +++++++++++++++++++++++++++++++ 22 files changed, 172 insertions(+), 12 deletions(-) -- 2.37.2