hw/core: Declare CPUArchId::cpu as CPUState instead of Object

Do not accept any Object for CPUArchId::cpu field,
restrict it to CPUState type.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240129164514.73104-3-philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
Philippe Mathieu-Daudé 2024-01-29 17:44:44 +01:00 committed by Thomas Huth
parent ee1004bba6
commit 97e0310601
6 changed files with 8 additions and 9 deletions

View file

@ -3979,7 +3979,6 @@ static void spapr_core_plug(HotplugHandler *hotplug_dev, DeviceState *dev)
SpaprMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
SpaprCpuCore *core = SPAPR_CPU_CORE(OBJECT(dev));
CPUCore *cc = CPU_CORE(dev);
CPUState *cs;
SpaprDrc *drc;
CPUArchId *core_slot;
int index;
@ -4013,7 +4012,7 @@ static void spapr_core_plug(HotplugHandler *hotplug_dev, DeviceState *dev)
}
}
core_slot->cpu = OBJECT(dev);
core_slot->cpu = CPU(dev);
/*
* Set compatibility mode to match the boot CPU, which was either set
@ -4029,7 +4028,7 @@ static void spapr_core_plug(HotplugHandler *hotplug_dev, DeviceState *dev)
if (smc->pre_2_10_has_unused_icps) {
for (i = 0; i < cc->nr_threads; i++) {
cs = CPU(core->threads[i]);
CPUState *cs = CPU(core->threads[i]);
pre_2_10_vmstate_unregister_dummy_icp(cs->cpu_index);
}
}