With cpu hotplug is implemented on LoongArch virt machine, reset
interface with hot-added CPU should be registered. Otherwise there
will be problem if system reboots after cpu is hot-added.
Also there is cleanup when system directly boot from Linux kernel image,
both BSP and APs boots from aux boot code, so that special reset
callback with BSP is not necessary.
---
v3 ... v4:
1. Register CPU reset interface in CPU hotplug callback rather than
CPU object realize stage.
v2 ... v3:
1. Add BSP core boot support from aux boot code.
2. Remove unnecessay pre-boot setting with BSP core.
3. Use qemu_register_resettable() API rather than legacy API
qemu_register_reset() to register reset interface.
v1 ... v2:
1. Add qemu_unregister_reset() in function loongarch_cpu_unrealizefn(),
remove reset callback if vCPU is unrealized.
---
Bibo Mao (3):
hw/loongarch/virt: Add BSP support with aux boot code
hw/loongarch/virt: Remove unnecessay pre-boot setting with BSP
hw/loongarch/virt: Register reset interface with cpu plug callback
hw/loongarch/boot.c | 71 ++++++++++++++++++++----------------------
hw/loongarch/virt.c | 2 ++
target/loongarch/cpu.h | 4 ---
3 files changed, 36 insertions(+), 41 deletions(-)
base-commit: baa79455fa92984ff0f4b9ae94bed66823177a27
--
2.39.3