From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58498) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzQqy-00055q-4P for qemu-devel@nongnu.org; Thu, 19 Nov 2015 10:10:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZzQqr-00063L-Kd for qemu-devel@nongnu.org; Thu, 19 Nov 2015 10:10:28 -0500 Received: from e37.co.us.ibm.com ([32.97.110.158]:40276) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzQqr-00062G-D9 for qemu-devel@nongnu.org; Thu, 19 Nov 2015 10:10:21 -0500 Received: from localhost by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 19 Nov 2015 08:10:18 -0700 Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by d03dlp01.boulder.ibm.com (Postfix) with ESMTP id 0AB941FF0049 for ; Thu, 19 Nov 2015 07:58:28 -0700 (MST) Received: from d03av05.boulder.ibm.com (d03av05.boulder.ibm.com [9.17.195.85]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id tAJF92t431654002 for ; Thu, 19 Nov 2015 08:09:02 -0700 Received: from d03av05.boulder.ibm.com (localhost [127.0.0.1]) by d03av05.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id tAJFAF0P016443 for ; Thu, 19 Nov 2015 08:10:16 -0700 From: Matthew Rosato Date: Thu, 19 Nov 2015 10:10:05 -0500 Message-Id: <1447945814-15765-1-git-send-email-mjrosato@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH v2 0/9] s390: Allow hotplug of s390 CPUs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: agraf@suse.de, borntraeger@de.ibm.com, cornelia.huck@de.ibm.com, pbonzini@redhat.com, afaerber@suse.de, rth@twiddle.net Changes from v1->v2: * Remove cpu-add support. Instead use 'device_add s390-cpu' * Add unplug support via 'device_del'. * Pull in 2 patches from pseries set. Patch 1 just required some rebasing. Patch 2 required minor changes due to previous upstream review comments. ************** The following patchset enables hotplug of s390 CPUs. The standard interface is used -- to configure a guest with 2 CPUs online at boot and 4 maximum: qemu -smp 2,maxcpus=4 To subsequently hotplug a CPU: Issue 'device_add s390-cpu,id=' from monitor. At this point, the guest must bring the CPU online for use -- This can be achieved via "echo 1 > /sys/devices/system/cpu/cpuX/online" or via a management tool like cpuplugd. Hot unplug support is provided via 'device_del ', however s390 does not have a mechanism for gracefully handling a CPU that has been removed, so this event triggers a reset of the guest in order to force recognition. This patch set is based on work previously done by Jason Herne. Bharata B Rao (1): cpus: Add a sync version of cpu_remove() Matthew Rosato (8): cpus: Reclaim vCPU objects s390x/cpu: Cleanup init in preparation for hotplug s390x/cpu: Set initial CPU state in common routine s390x/cpu: Move some CPU initialization into realize s390x/cpu: Add functions to (un)register CPU state s390x/cpu: Extra cleanup during CPU finalize s390/virtio-ccw: Add hotplug handler and prepare for unplug s390x/cpu: Allow hot plug/unplug of CPUs cpus.c | 53 +++++++++++++++++++++++++++++ hw/s390x/s390-virtio-ccw.c | 30 ++++++++++++++++- hw/s390x/s390-virtio.c | 66 ++++++++++++++++++++++++++---------- hw/s390x/s390-virtio.h | 2 +- include/qom/cpu.h | 18 ++++++++++ include/sysemu/kvm.h | 1 + kvm-all.c | 57 ++++++++++++++++++++++++++++++- kvm-stub.c | 5 +++ target-s390x/cpu.c | 83 +++++++++++++++++++++++++++++++++++++++++++--- target-s390x/cpu.h | 4 +++ 10 files changed, 295 insertions(+), 24 deletions(-) -- 1.9.1