[PATCH v4 0/3] Register reset interface with hot-add CPUs

Bibo Mao posted 3 patches 3 weeks, 1 day ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250906070200.3749326-1-maobibo@loongson.cn
Maintainers: Song Gao <gaosong@loongson.cn>, Bibo Mao <maobibo@loongson.cn>, Jiaxun Yang <jiaxun.yang@flygoat.com>
hw/loongarch/boot.c    | 71 ++++++++++++++++++++----------------------
hw/loongarch/virt.c    |  2 ++
target/loongarch/cpu.h |  4 ---
3 files changed, 36 insertions(+), 41 deletions(-)
[PATCH v4 0/3] Register reset interface with hot-add CPUs
Posted by Bibo Mao 3 weeks, 1 day ago
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