[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v3 4/9] hw/arm/virt: Initialize the present cpu members
From: |
Andrew Jones |
Subject: |
Re: [RFC PATCH v3 4/9] hw/arm/virt: Initialize the present cpu members |
Date: |
Mon, 17 May 2021 08:43:52 +0200 |
On Sun, May 16, 2021 at 06:28:55PM +0800, Yanan Wang wrote:
> We create and initialize a cpuobj for each present cpu in
> machvirt_init(). Now we also initialize the cpu member of
> structure CPUArchId for each present cpu in the function.
>
> This will be used to determine whether a cpu is present
> when generating ACPI tables in later patches.
>
> Co-developed-by: Ying Fang <fangying1@huawei.com>
> Signed-off-by: Ying Fang <fangying1@huawei.com>
> Signed-off-by: Yanan Wang <wangyanan55@huawei.com>
> ---
> hw/arm/virt.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index e5dcdebdbc..50e324975f 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -2061,6 +2061,13 @@ static void machvirt_init(MachineState *machine)
> }
>
> qdev_realize(DEVICE(cpuobj), NULL, &error_fatal);
> +
> + /*
> + * As ARM cpu hotplug is not supported yet, we initialize
> + * the present cpu members here.
> + */
> + machine->possible_cpus->cpus[n].cpu = cpuobj;
> +
> object_unref(cpuobj);
> }
> fdt_add_timer_nodes(vms);
> --
> 2.19.1
>
Reviewed-by: Andrew Jones <drjones@redhat.com>
[RFC PATCH v3 9/9] hw/arm/virt: Add separate -smp parsing function for ARM machines, Yanan Wang, 2021/05/16
[RFC PATCH v3 8/9] hw/arm/virt-acpi-build: Generate PPTT table, Yanan Wang, 2021/05/16