* [PATCH] microvm: use MachineState->dumpdtb
@ 2021-11-23 9:16 Gerd Hoffmann
2021-11-24 7:24 ` Igor Mammedov
0 siblings, 1 reply; 3+ messages in thread
From: Gerd Hoffmann @ 2021-11-23 9:16 UTC (permalink / raw)
To: qemu-devel
Cc: Eduardo Habkost, Michael S. Tsirkin, Richard Henderson,
Gerd Hoffmann, Paolo Bonzini
There already is a machine property to dumb the device tree for
debugging purposes, and the helper function qemu_fdt_dumpdtb()
implementing the dumbing. Make microvm use it for consistency.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/i386/microvm-dt.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/hw/i386/microvm-dt.c b/hw/i386/microvm-dt.c
index 875ba9196394..e6f5a90209c5 100644
--- a/hw/i386/microvm-dt.c
+++ b/hw/i386/microvm-dt.c
@@ -330,12 +330,5 @@ void dt_setup_microvm(MicrovmMachineState *mms)
fprintf(stderr, "%s: add etc/fdt to fw_cfg\n", __func__);
fw_cfg_add_file(x86ms->fw_cfg, "etc/fdt", mms->fdt, size);
- if (debug) {
- fprintf(stderr, "%s: writing microvm.fdt\n", __func__);
- g_file_set_contents("microvm.fdt", mms->fdt, size, NULL);
- int ret = system("dtc -I dtb -O dts microvm.fdt");
- if (ret != 0) {
- fprintf(stderr, "%s: oops, dtc not installed?\n", __func__);
- }
- }
+ qemu_fdt_dumpdtb(mms->fdt, size);
}
--
2.33.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] microvm: use MachineState->dumpdtb
2021-11-23 9:16 [PATCH] microvm: use MachineState->dumpdtb Gerd Hoffmann
@ 2021-11-24 7:24 ` Igor Mammedov
2021-11-24 7:41 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 3+ messages in thread
From: Igor Mammedov @ 2021-11-24 7:24 UTC (permalink / raw)
To: Gerd Hoffmann
Cc: Paolo Bonzini, Michael S. Tsirkin, Richard Henderson, qemu-devel,
Eduardo Habkost
On Tue, 23 Nov 2021 10:16:48 +0100
Gerd Hoffmann <kraxel@redhat.com> wrote:
> There already is a machine property to dumb the device tree for
s/dumb/dump/
> debugging purposes, and the helper function qemu_fdt_dumpdtb()
> implementing the dumbing. Make microvm use it for consistency.
ditto
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> hw/i386/microvm-dt.c | 9 +--------
> 1 file changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/hw/i386/microvm-dt.c b/hw/i386/microvm-dt.c
> index 875ba9196394..e6f5a90209c5 100644
> --- a/hw/i386/microvm-dt.c
> +++ b/hw/i386/microvm-dt.c
> @@ -330,12 +330,5 @@ void dt_setup_microvm(MicrovmMachineState *mms)
> fprintf(stderr, "%s: add etc/fdt to fw_cfg\n", __func__);
> fw_cfg_add_file(x86ms->fw_cfg, "etc/fdt", mms->fdt, size);
>
> - if (debug) {
> - fprintf(stderr, "%s: writing microvm.fdt\n", __func__);
> - g_file_set_contents("microvm.fdt", mms->fdt, size, NULL);
> - int ret = system("dtc -I dtb -O dts microvm.fdt");
> - if (ret != 0) {
> - fprintf(stderr, "%s: oops, dtc not installed?\n", __func__);
> - }
> - }
> + qemu_fdt_dumpdtb(mms->fdt, size);
> }
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] microvm: use MachineState->dumpdtb
2021-11-24 7:24 ` Igor Mammedov
@ 2021-11-24 7:41 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-11-24 7:41 UTC (permalink / raw)
To: Igor Mammedov, Gerd Hoffmann
Cc: Paolo Bonzini, Richard Henderson, qemu-devel, Eduardo Habkost,
Michael S. Tsirkin
On 11/24/21 08:24, Igor Mammedov wrote:
> On Tue, 23 Nov 2021 10:16:48 +0100
> Gerd Hoffmann <kraxel@redhat.com> wrote:
>
>> There already is a machine property to dumb the device tree for
> s/dumb/dump/
>
>
>> debugging purposes, and the helper function qemu_fdt_dumpdtb()
>> implementing the dumbing. Make microvm use it for consistency.
> ditto
>
>>
>> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
>> ---
>> hw/i386/microvm-dt.c | 9 +--------
>> 1 file changed, 1 insertion(+), 8 deletions(-)
Regardless of the funny typo:
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-24 7:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-23 9:16 [PATCH] microvm: use MachineState->dumpdtb Gerd Hoffmann
2021-11-24 7:24 ` Igor Mammedov
2021-11-24 7:41 ` Philippe Mathieu-Daudé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).