diff mbox

[0/4] s390: Allow hotplug of s390 CPUs

Message ID 5640FC4B.600@de.ibm.com
State New
Headers show

Commit Message

Christian Borntraeger Nov. 9, 2015, 8:04 p.m. UTC
Am 09.11.2015 um 16:56 schrieb Andreas Färber:
> 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 <id>' from qemu monitor, or use virsh setvcpus --count <n> 
>>>>> <domain>, where <n> 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? 
> 
> No, I mean as I've always said: cpu-add was a short-term hack to make
> CPU hotplug work on x86. libvirt certainly needs to be fixed if it
> assumes this to work for s390.
> 
> If device_add works, we don't need cpu-add. If device_add does not work,
> we need to know which patches are missing. device_del is a separate
> beast and there were also patches around that seemed incomplete
> according to Eduardo.

Given that s390 plugs CPUs without sockets, it would boild down to an opaque
cpu, so
- Matt will remove the hot_add function from patch 4 (which makes it smaller)
- we provide a followup patch for libvirt
- Matt fixes the maxcpus overrun
- In addition we would need something like 

With that device_add s390-cpu seems to work. 

> Bharata did implement device_add for pseries, I thought.

Seems that the patches did not make it into upstream yet.
Bharata, is cpu hotplug on pseries still missing?


Christian

Comments

Bharata B Rao Nov. 10, 2015, 12:39 p.m. UTC | #1
On Mon, Nov 09, 2015 at 09:04:27PM +0100, Christian Borntraeger wrote:
> 
> > Bharata did implement device_add for pseries, I thought.

Yes. For pseries, my patchset did CPU hotplug via device_add and
device_del commands. And that's what I am planning to stick to
going forward.

> 
> Seems that the patches did not make it into upstream yet.
> Bharata, is cpu hotplug on pseries still missing?

Yes, the last version I posted is at
https://lists.gnu.org/archive/html/qemu-devel/2015-08/msg00650.html

Andreas mentioned that he would like to see some generic changes for
supporting device_add for CPU, socket vs core level hotplug, defining the
semantics etc. There was some discussion towards that and this is last I
heard about it:

https://lists.nongnu.org/archive/html/qemu-devel/2015-10/msg05347.html

Regards,
Bharata.
diff mbox

Patch

diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c
index 266575c..cfcff52 100644
--- a/target-s390x/cpu.c
+++ b/target-s390x/cpu.c
@@ -377,7 +377,7 @@  static void s390_cpu_class_init(ObjectClass *oc, void *data)
 
     scc->parent_realize = dc->realize;
     dc->realize = s390_cpu_realizefn;
-
+    dc->cannot_instantiate_with_device_add_yet = false;
     scc->parent_reset = cc->reset;
 #if !defined(CONFIG_USER_ONLY)
     scc->load_normal = s390_cpu_load_normal