qemu-arm
[Top][All Lists]
Advanced

[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: wangyanan (Y)
Subject: Re: [RFC PATCH v3 4/9] hw/arm/virt: Initialize the present cpu members
Date: Tue, 18 May 2021 12:42:30 +0800
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0

Hi Salil,

On 2021/5/18 4:48, Salil Mehta wrote:
From: Qemu-arm [mailto:qemu-arm-bounces+salil.mehta=huawei.com@nongnu.org]
On Behalf Of Yanan Wang
Sent: Sunday, May 16, 2021 11:29 AM
To: Peter Maydell <peter.maydell@linaro.org>; Andrew Jones
<drjones@redhat.com>; Michael S . Tsirkin <mst@redhat.com>; Igor Mammedov
<imammedo@redhat.com>; Shannon Zhao <shannon.zhaosl@gmail.com>; Alistair
Francis <alistair.francis@wdc.com>; David Gibson
<david@gibson.dropbear.id.au>; qemu-devel@nongnu.org; qemu-arm@nongnu.org
Cc: Song Bao Hua (Barry Song) <song.bao.hua@hisilicon.com>; zhukeqian
<zhukeqian1@huawei.com>; yangyicong <yangyicong@huawei.com>; Zengtao (B)
<prime.zeng@hisilicon.com>; Wanghaibin (D) <wanghaibin.wang@huawei.com>;
yuzenghui <yuzenghui@huawei.com>; Paolo Bonzini <pbonzini@redhat.com>;
Philippe Mathieu-Daudé <philmd@redhat.com>
Subject: [RFC PATCH v3 4/9] hw/arm/virt: Initialize the present cpu members

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.
[...]

          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;

when vcpu Hotplug is not supported yet, what necessitates this change now?

The initialization will gives a way to determine whether a CPU is present or not. At least, for now it will be used when generating ACPI tables, e.g. DSDT, MADT.
See patch 5 and 6.

Thanks,
Yanan
.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]