Commit 0347ab84 authored by David Hildenbrand's avatar David Hildenbrand Committed by Cornelia Huck
Browse files

s390x: allow cpu hotplug via device_add



E.g. the following now works:
    device_add host-s390-cpu,id=cpu1,core-id=1

The system will perform the same checks as when using cpu_add:
- If the core_id is already in use
- If the next sequential core_id isn't used
- If core-id >= max_cpu is specified

In addition, mixed CPU models are checked. E.g. if starting with
-cpu host and trying to hotplug "qemu-s390-cpu":
    "Mixed CPU models are not supported on s390x."

Reviewed-by: default avatarMatthew Rosato <mjrosato@linux.vnet.ibm.com>
Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
Message-Id: <20170913132417.24384-17-david@redhat.com>
Signed-off-by: default avatarCornelia Huck <cohuck@redhat.com>
parent 99aa6bf2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -467,6 +467,7 @@ static void s390_cpu_class_init(ObjectClass *oc, void *data)
    scc->parent_realize = dc->realize;
    dc->realize = s390_cpu_realizefn;
    dc->props = s390x_cpu_properties;
    dc->user_creatable = true;

    scc->parent_reset = cc->reset;
#if !defined(CONFIG_USER_ONLY)