qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] fix dumpdtb crash with ARM machines
@ 2023-03-23 16:10 Daniel Henrique Barboza
  2023-03-23 16:10 ` [PATCH 1/1] hw/arm: do not free machine->fdt in arm_load_dtb() Daniel Henrique Barboza
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Henrique Barboza @ 2023-03-23 16:10 UTC (permalink / raw)
  To: qemu-devel
  Cc: Daniel Henrique Barboza, Peter Maydell, Markus Armbruster,
	qemu-arm

Hi,

This is a re-post of "[PATCH v8 03/16] hw/arm: do not free machine->fdt
in arm_load_dtb()":

https://lists.gnu.org/archive/html/qemu-devel/2022-09/msg04201.html

Turns out that I drop the ball and left this patch behind. Aside from
some patches of that series that were optional, the way ARM code is
working ATM is causing 'dumpdtb' to crash QEMU, as reported by Markus in
https://lists.gnu.org/archive/html/qemu-devel/2023-03/msg05858.html .

Applying this patch fixes the reported crash:

$ ./qemu-system-aarch64 -S -M virt -display none -qmp stdio
{"QMP": {"version": {"qemu": {"micro": 91, "minor": 2, "major": 7}, "package": "v8.0.0-rc1-37-g298c4469cf"}, "capabilities": ["oob"]}}
{"execute": "qmp_capabilities", "arguments": {"enable": ["oob"]}}
{"return": {}}
{"execute": "dumpdtb", "arguments": {"filename": "fdt.dtb"}}
{"return": {}}
^Cqemu-system-aarch64: terminating on signal 2
{"timestamp": {"seconds": 1679587153, "microseconds": 714319}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-signal"}}
$ 
$ dtc -I dtb -O dts fdt.dtb | grep timer
	timer {
		compatible = "arm,armv7-timer";
$

Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Markus Armbruster <armbru@redhat.com>
Cc: qemu-arm@nongnu.org

Daniel Henrique Barboza (1):
  hw/arm: do not free machine->fdt in arm_load_dtb()

 hw/arm/boot.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.39.2



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-03-23 20:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-23 16:10 [PATCH 0/1] fix dumpdtb crash with ARM machines Daniel Henrique Barboza
2023-03-23 16:10 ` [PATCH 1/1] hw/arm: do not free machine->fdt in arm_load_dtb() Daniel Henrique Barboza
2023-03-23 17:38   ` Peter Maydell
2023-03-23 17:54     ` Daniel Henrique Barboza
2023-03-23 17:59       ` Peter Maydell
2023-03-23 20:15         ` Daniel Henrique Barboza

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).