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

Bibo Mao posted 3 patches 1 month ago
There is a newer version of this series
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(-)
[PATCH 0/3] hw/loongarch/virt: Add cpu hotplug support
Posted by Bibo Mao 1 month ago
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
-- 
2.39.3