Message ID | 20250128142152.9889-7-philmd@linaro.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | accel: Only include qdev-realized vCPUs in global &cpus_queue | expand |
On 1/28/25 06:21, Philippe Mathieu-Daudé wrote: > To call the hotplug handlers with REALIZED vCPU, we can > use the DeviceWire handler. > > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> > --- > hw/core/cpu-common.c | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c > index 9ee44a00277..8a02ac146f6 100644 > --- a/hw/core/cpu-common.c > +++ b/hw/core/cpu-common.c > @@ -211,16 +211,17 @@ static void cpu_common_realizefn(DeviceState *dev, Error **errp) > } > } > > - if (dev->hotplugged) { > - cpu_synchronize_post_init(cpu); > - cpu_resume(cpu); > - } > - > /* NOTE: latest generic point where the cpu is fully realized */ > } > > static void cpu_common_wire(DeviceState *dev) > { > + CPUState *cpu = CPU(dev); > + > + if (dev->hotplugged) { > + cpu_synchronize_post_init(cpu); > + cpu_resume(cpu); > + } > } > > static void cpu_common_unwire(DeviceState *dev) Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c index 9ee44a00277..8a02ac146f6 100644 --- a/hw/core/cpu-common.c +++ b/hw/core/cpu-common.c @@ -211,16 +211,17 @@ static void cpu_common_realizefn(DeviceState *dev, Error **errp) } } - if (dev->hotplugged) { - cpu_synchronize_post_init(cpu); - cpu_resume(cpu); - } - /* NOTE: latest generic point where the cpu is fully realized */ } static void cpu_common_wire(DeviceState *dev) { + CPUState *cpu = CPU(dev); + + if (dev->hotplugged) { + cpu_synchronize_post_init(cpu); + cpu_resume(cpu); + } } static void cpu_common_unwire(DeviceState *dev)
To call the hotplug handlers with REALIZED vCPU, we can use the DeviceWire handler. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- hw/core/cpu-common.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)