mbox series

[0/3] hw/loongarch/virt: Add cpu hotplug support

Message ID 20241023071312.881866-1-maobibo@loongson.cn (mailing list archive)
Headers show
Series hw/loongarch/virt: Add cpu hotplug support | expand

Message

maobibo Oct. 23, 2024, 7:13 a.m. UTC
LoongArch cpu hotplug is based on ACPI GED device, there is a little
change about ipi device, the value of num-cpu property is maximum cpu
number rather than present cpu number.

It can be verified with qemu command:
  qemu-system-loongarch64 -smp 2,maxcpus=16,sockets=4,cores=4,threads=1
and vcpu can be added or remove with hmp command:
  device_add la464-loongarch-cpu,socket-id=0,core-id=2,thread-id=0,id=cpu-2
  device_del cpu-2

Bibo Mao (3):
  hw/loongarch/virt: Add CPU topology support
  hw/loongarch/virt: Add basic CPU plug support
  hw/loongarch/virt: Update the ACPI table for hotplug cpu

 docs/system/loongarch/virt.rst |  31 ++++
 hw/loongarch/Kconfig           |   1 +
 hw/loongarch/acpi-build.c      |  35 +++-
 hw/loongarch/virt.c            | 283 +++++++++++++++++++++++++++++++--
 include/hw/loongarch/virt.h    |   3 +
 target/loongarch/cpu.c         |  25 +++
 target/loongarch/cpu.h         |  11 ++
 7 files changed, 371 insertions(+), 18 deletions(-)


base-commit: cc5adbbd50d81555b8eb73602ec16fde40b55be4