This series is based on the previous patchset from Chen Fan: https://lists.nongnu.org/archive/html/qemu-devel/2014-05/msg02360.html
This patches try to make cpu hotplug with device_add, and make "-device foo-x86_64-cpu" availableļ¼also we can set apic-id property with command line, if without setting apic-id property, we offer the first unoccupied apic id as the default new apic id. When hotplug cpu with device_add, additional check of APIC ID will be done after cpu object initialization which was different from 'cpu_add' command that check 'ids' at the beginning. Chen Fan (2): cpu: introduce CpuTopoInfo structure for argument simplification cpu: add device_add foo-x86_64-cpu support Gu Zheng (1): qom/cpu: move register_vmstate to common CPUClass.realizefn exec.c | 32 ++++++++++------- hw/intc/apic_common.c | 3 +- include/hw/i386/apic_internal.h | 3 +- include/qom/cpu.h | 3 ++ qdev-monitor.c | 1 + qom/cpu.c | 2 + target-i386/cpu.c | 76 ++++++++++++++++++++++++++++++++++++-- target-i386/topology.h | 51 ++++++++++++++++++-------- 8 files changed, 135 insertions(+), 36 deletions(-) -- 1.7.7