From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37537) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIgUl-0003tx-Js for qemu-devel@nongnu.org; Thu, 21 Mar 2013 10:29:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIgUY-0004CM-U4 for qemu-devel@nongnu.org; Thu, 21 Mar 2013 10:29:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53843) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIgUY-00049K-Ms for qemu-devel@nongnu.org; Thu, 21 Mar 2013 10:29:18 -0400 From: Igor Mammedov Date: Thu, 21 Mar 2013 15:28:33 +0100 Message-Id: <1363876125-8264-1-git-send-email-imammedo@redhat.com> Subject: [Qemu-devel] [RFC 00/12] target-i386: CPU hot-add with cpu_set QMP command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, peter.maydell@linaro.org, aliguori@us.ibm.com, ehabkost@redhat.com, mst@redhat.com, jan.kiszka@siemens.com, stefano.stabellini@eu.citrix.com, claudio.fontana@huawei.com, armbru@redhat.com, quintela@redhat.com, lcapitulino@redhat.com, blauwirbel@gmail.com, yang.z.zhang@intel.com, alex.williamson@redhat.com, aderumier@odiso.com, kraxel@redhat.com, anthony.perard@citrix.com, pbonzini@redhat.com, afaerber@suse.de, rth@twiddle.net Implements alternative way for hot-adding CPU using cpu_set QMP command, wich could be useful until it would be possible to add CPUs via device_add. Patches 1-10 are common to both approaches 11-12 are specific to adding CPU using cpu_set To hot-add CPU use following command from qmp-shell: cpu_set in=[apic id] status=online git tree for testing: https://github.com/imammedo/qemu/tree/cpu_set Igor Mammedov (12): target-i386: consolidate error propagation in x86_cpu_realizefn() target-i386: split APIC creation from initialization in x86_cpu_realizefn() target-i386: split out CPU creation and features parsing into cpu_x86_create() target-i386: introduce apic-id property target-i386: push hot-plugged VCPU state to KVM and unstop it target-i386: replace FROM_SYSBUS() with QOM type cast target-i386: Add ICC_BUS and attach apic, kvmvapic and cpu to it introduce CPU hot-plug notifier rtc: update rtc_cmos on CPU hot-plug acpi_piix4: add infrastructure to send CPU hot-plug GPE to guest qmp: add cpu_set qmp command target-i386: implement CPU hot-add cpus.c | 11 ++- hw/acpi_piix4.c | 107 ++++++++++++++++++++- hw/apic_common.c | 14 ++- hw/apic_internal.h | 6 +- hw/i386/Makefile.objs | 2 +- hw/i386/kvmvapic.c | 22 +++-- hw/i386/pc.c | 47 +++++++++- hw/icc_bus.c | 75 ++++++++++++++ hw/icc_bus.h | 47 +++++++++ hw/mc146818rtc.c | 12 +++ include/sysemu/cpus.h | 3 + include/sysemu/sysemu.h | 6 + qapi-schema.json | 9 ++ qmp-commands.hx | 26 +++++ qmp.c | 12 +++ stubs/Makefile.objs | 4 + stubs/do_cpu_hot_add.c | 7 ++ stubs/get_icc_bus.c | 6 + stubs/qemu_system_cpu_hotplug_request.c | 5 + stubs/resume_vcpu.c | 6 + target-i386/cpu.c | 164 ++++++++++++++++++++++++++----- target-i386/cpu.h | 3 + vl.c | 14 +++ 23 files changed, 561 insertions(+), 47 deletions(-) create mode 100644 hw/icc_bus.c create mode 100644 hw/icc_bus.h create mode 100644 stubs/do_cpu_hot_add.c create mode 100644 stubs/get_icc_bus.c create mode 100644 stubs/qemu_system_cpu_hotplug_request.c create mode 100644 stubs/resume_vcpu.c