@@ -163,6 +163,7 @@ void pc_acpi_smi_interrupt(void *opaque, int irq,
int level);
void pc_cpus_init(const char *cpu_model, DeviceState *icc_bridge);
void pc_hot_add_cpu(const int64_t id, Error **errp);
+void pc_hot_del_cpu(const int64_t id, Error **errp);
void pc_acpi_init(const char *default_dsdt);
PcGuestInfo *pc_guest_info_init(ram_addr_t below_4g_mem_size,
@@ -472,6 +473,7 @@ int e820_add_entry(uint64_t, uint64_t, uint32_t);
#define PC_DEFAULT_MACHINE_OPTIONS \
PC_COMMON_MACHINE_OPTIONS, \
.hot_add_cpu = pc_hot_add_cpu, \
+ .hot_del_cpu = pc_hot_del_cpu, \
.max_cpus = 255
#endif
@@ -126,6 +126,18 @@ void qmp_cpu_add(int64_t id, Error **errp)
}
}
+void qmp_cpu_del(int64_t id, Error **errp)
+{
+ MachineClass *mc;
+ mc = MACHINE_GET_CLASS(current_machine);
+ if (mc->qemu_machine->hot_del_cpu) {
+ mc->qemu_machine->hot_del_cpu(id, errp);
+ }
+ else {
+ error_setg(errp, "Not supported");
+ }
+}
+
#ifndef CONFIG_VNC
/* If VNC support is enabled, the "true" query-vnc command is
defined in the VNC subsystem */