From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36150) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvoyR-0001Zu-Rc for qemu-devel@nongnu.org; Mon, 09 Nov 2015 11:07:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZvoyM-00079R-0s for qemu-devel@nongnu.org; Mon, 09 Nov 2015 11:07:15 -0500 Received: from e34.co.us.ibm.com ([32.97.110.152]:53518) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvoyL-00079M-Qm for qemu-devel@nongnu.org; Mon, 09 Nov 2015 11:07:09 -0500 Received: from localhost by e34.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 9 Nov 2015 09:07:09 -0700 Received: from b03cxnp07029.gho.boulder.ibm.com (b03cxnp07029.gho.boulder.ibm.com [9.17.130.16]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id 50CDC19D8048 for ; Mon, 9 Nov 2015 08:55:14 -0700 (MST) Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id tA9G76Mc12583180 for ; Mon, 9 Nov 2015 09:07:06 -0700 Received: from d03av01.boulder.ibm.com (localhost [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id tA9G75w0026862 for ; Mon, 9 Nov 2015 09:07:05 -0700 References: <1447082260-427-1-git-send-email-mjrosato@linux.vnet.ibm.com> <5640BBAA.1000201@suse.de> <5640BD5B.9050204@de.ibm.com> <5640BDD2.9040102@de.ibm.com> <5640C207.70304@de.ibm.com> From: Matthew Rosato Message-ID: <5640C4A7.20908@linux.vnet.ibm.com> Date: Mon, 9 Nov 2015 11:07:03 -0500 MIME-Version: 1.0 In-Reply-To: <5640C207.70304@de.ibm.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 0/4] s390: Allow hotplug of s390 CPUs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christian Borntraeger , =?UTF-8?Q?Andreas_F=c3=a4rber?= , qemu-devel@nongnu.org Cc: cornelia.huck@de.ibm.com, agraf@suse.de, rth@twiddle.net On 11/09/2015 10:55 AM, Christian Borntraeger wrote: > Am 09.11.2015 um 16:37 schrieb Christian Borntraeger: >> Am 09.11.2015 um 16:35 schrieb Christian Borntraeger: >>> Am 09.11.2015 um 16:28 schrieb Andreas Färber: >>>> Hi, >>>> >>>> Am 09.11.2015 um 16:17 schrieb Matthew Rosato: >>>>> 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. >>>> >>>> What exactly is still missing for you to use the standard device_add? >>>> >>>> Last time I checked (a while ago...) some patches were stuck on the x86 >>>> side, and I don't recall hearing any feedback from the s390x side in my >>>> KVM Forum CPU hotplug session. >>> >>> libvirt uses "cpu-add" unconditionally for hotplugging, so we certainly >>> want to support that. >> >> Sorry, hit send too early. I assume you want us to support device_add of >> a CPU in addition to that. Correct? > > I just did a quick test with Matts patch. > > after applying > > diff --git a/qom/cpu.c b/qom/cpu.c > index fb80d13..8152744 100644 > --- a/qom/cpu.c > +++ b/qom/cpu.c > @@ -360,7 +360,7 @@ static void cpu_class_init(ObjectClass *klass, void *data) > * Reason: CPUs still need special care by board code: wiring up > * IRQs, adding reset handlers, halting non-first CPUs, ... > */ > - dc->cannot_instantiate_with_device_add_yet = true; > +// dc->cannot_instantiate_with_device_add_yet = true; > } > > static const TypeInfo cpu_type_info = { > > I was able to use > > device_add s390-cpu > > but no comprehensive testing was done. > I was even able to add more cpus than maxcpus, but the guest could not > make use of it. Fix is probably easy. But in general it looks like > that we _could_ enable device_add for CPUs as soon as others are ready > as well. > Matt, do you agree? > Yes, I'm seeing the same behavior. We're just not checking max_cpus in device init, but the "extra" CPUs cannot be brought online. Matt