From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39435) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abtcn-0005o0-RH for qemu-devel@nongnu.org; Fri, 04 Mar 2016 12:34:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1abtci-0000wL-RX for qemu-devel@nongnu.org; Fri, 04 Mar 2016 12:34:49 -0500 Received: from e34.co.us.ibm.com ([32.97.110.152]:41494) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abtci-0000wC-Kk for qemu-devel@nongnu.org; Fri, 04 Mar 2016 12:34:44 -0500 Received: from localhost by e34.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 4 Mar 2016 10:34:42 -0700 Received: from b01cxnp22035.gho.pok.ibm.com (b01cxnp22035.gho.pok.ibm.com [9.57.198.25]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id 2567519D804E for ; Fri, 4 Mar 2016 10:22:36 -0700 (MST) Received: from d01av05.pok.ibm.com (d01av05.pok.ibm.com [9.56.224.195]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u24HYdJn31654044 for ; Fri, 4 Mar 2016 17:34:39 GMT Received: from d01av05.pok.ibm.com (localhost [127.0.0.1]) by d01av05.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u24HUMTY001621 for ; Fri, 4 Mar 2016 12:30:23 -0500 From: Matthew Rosato Date: Fri, 4 Mar 2016 12:34:28 -0500 Message-Id: <1457112875-5209-1-git-send-email-mjrosato@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH v9 0/7] Allow hotplug of s390 CPUs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: dahi@linux.vnet.ibm.com, agraf@suse.de, borntraeger@de.ibm.com, imammedo@redhat.com, bharata@linux.vnet.ibm.com, cornelia.huck@de.ibm.com, pbonzini@redhat.com, afaerber@suse.de, rth@twiddle.net Changes from v8->v9: * Patch 4: fix bug introduced during split, only init smp_cpus (David) * Patch 6: * nit change to error_propagate handling in realizefn (David) * scc->next_cpu_id++ (David) * s/s390_cpu_set_id/s390x_cpu_set_id/ (David) * s/s390_new_cpu/s390x_new_cpu/ (David) * Put id getter back in (David) * Move linux-user next_cpu_id into s390_cpux_init (David) * Patch 7: nit change to error_propagate handling (David) ************** As discussed in the KVM call, we will go ahead with cpu_add for s390x to get cpu hotplug functionality in s390x now, until architectures that require a more robust hotplug interface settle on a design. To configure a guest with 2 CPUs online at boot and 4 maximum: qemu -smp 2,maxcpus=4 Or, when using libvirt: ... 4 ... To subsequently hotplug a CPU: Issue 'cpu-add ' from qemu monitor, or use virsh setvcpus --count , where is the total number of desired guest CPUs. 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. This patch set is based on work previously done by Jason Herne. Matthew Rosato (7): s390x/cpu: Cleanup init in preparation for hotplug s390x/cpu: Set initial CPU state in common routine s390x/cpu: Get rid of side effects when creating a vcpu s390x/cpu: Tolerate max_cpus s390x/cpu: Add CPU property links s390x/cpu: Add error handling to cpu creation s390x/cpu: Allow hotplug of CPUs hw/s390x/s390-virtio-ccw.c | 46 +++++++++++++++++++++- hw/s390x/s390-virtio.c | 36 +++++++++-------- hw/s390x/s390-virtio.h | 2 +- target-s390x/cpu-qom.h | 3 ++ target-s390x/cpu.c | 96 +++++++++++++++++++++++++++++++++++++++++++--- target-s390x/cpu.h | 2 + target-s390x/helper.c | 41 +++++++++++++++++++- 7 files changed, 200 insertions(+), 26 deletions(-) -- 1.9.1