projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4eea9d7
)
virt: Fix crash when introspecting the device
author
Alistair Francis
<alistair.francis@wdc.com>
Mon, 16 Jul 2018 22:30:47 +0000
(15:30 -0700)
committer
Alistair Francis
<alistair.francis@wdc.com>
Thu, 19 Jul 2018 16:05:48 +0000
(09:05 -0700)
Use the new object_initialize_child() and sysbus_init_child_obj() to
fix the issue.
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Suggested-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Michael Clark <mjc@sifive.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
hw/riscv/virt.c
patch
|
blob
|
history
diff --git
a/hw/riscv/virt.c
b/hw/riscv/virt.c
index aeada2498da514e652e77e3ec05b66e5df83a574..248bbdffd3a230a59d7609138c665869b6bf1658 100644
(file)
--- a/
hw/riscv/virt.c
+++ b/
hw/riscv/virt.c
@@
-274,9
+274,8
@@
static void riscv_virt_board_init(MachineState *machine)
void *fdt;
/* Initialize SOC */
- object_initialize(&s->soc, sizeof(s->soc), TYPE_RISCV_HART_ARRAY);
- object_property_add_child(OBJECT(machine), "soc", OBJECT(&s->soc),
- &error_abort);
+ object_initialize_child(OBJECT(machine), "soc", &s->soc, sizeof(s->soc),
+ TYPE_RISCV_HART_ARRAY, &error_abort, NULL);
object_property_set_str(OBJECT(&s->soc), VIRT_CPU, "cpu-type",
&error_abort);
object_property_set_int(OBJECT(&s->soc), smp_cpus, "num-harts",