[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1 3/5] virt: Fix crash when introspecting the d
From: |
Michael Clark |
Subject: |
Re: [Qemu-devel] [PATCH v1 3/5] virt: Fix crash when introspecting the device |
Date: |
Wed, 18 Jul 2018 09:03:42 +1200 |
On Wed, Jul 18, 2018 at 8:28 AM, Alistair Francis <address@hidden>
wrote:
> Use the new object_initialize_child() and sysbus_init_child_obj() to
> fix the issue.
>
> Signed-off-by: Alistair Francis <address@hidden>
>
Reviewed-by: Michael Clark <address@hidden>
> ---
> hw/riscv/virt.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c
> index aeada2498d..248bbdffd3 100644
> --- 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",
> --
> 2.17.1
>
>
- [Qemu-devel] [PATCH v1 0/5] riscv: Fix introspection problems, Alistair Francis, 2018/07/17
- [Qemu-devel] [PATCH v1 1/5] sifive_e: Fix crash when introspecting the device, Alistair Francis, 2018/07/17
- [Qemu-devel] [PATCH v1 2/5] sifive_u: Fix crash when introspecting the device, Alistair Francis, 2018/07/17
- [Qemu-devel] [PATCH v1 3/5] virt: Fix crash when introspecting the device, Alistair Francis, 2018/07/17
- Re: [Qemu-devel] [PATCH v1 3/5] virt: Fix crash when introspecting the device,
Michael Clark <=
- [Qemu-devel] [PATCH v1 4/5] riscv_hart: Fix crash when introspecting the device, Alistair Francis, 2018/07/17
- [Qemu-devel] [PATCH v1 5/5] spike: Fix crash when introspecting the device, Alistair Francis, 2018/07/17
- Re: [Qemu-devel] [PATCH v1 0/5] riscv: Fix introspection problems, Thomas Huth, 2018/07/18
- Re: [Qemu-devel] [PATCH v1 0/5] riscv: Fix introspection problems, Thomas Huth, 2018/07/18