[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v5 16/22] s390x: allow cpu hotplug via device_add
From: |
David Hildenbrand |
Subject: |
[Qemu-devel] [PATCH v5 16/22] s390x: allow cpu hotplug via device_add |
Date: |
Wed, 13 Sep 2017 15:24:11 +0200 |
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: Matthew Rosato <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>
---
target/s390x/cpu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
index 8c1c644057..5724dffb88 100644
--- a/target/s390x/cpu.c
+++ b/target/s390x/cpu.c
@@ -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)
--
2.13.5
- [Qemu-devel] [PATCH v5 11/22] s390x: allow only 1 CPU with TCG, (continued)
[Qemu-devel] [PATCH v5 12/22] target/s390x: set cpu->id for linux user when realizing, David Hildenbrand, 2017/09/13
[Qemu-devel] [PATCH v5 14/22] target/s390x: rename next_cpu_id to next_core_id, David Hildenbrand, 2017/09/13
[Qemu-devel] [PATCH v5 13/22] target/s390x: use "core-id" for cpu number/address/id handling, David Hildenbrand, 2017/09/13
[Qemu-devel] [PATCH v5 15/22] s390x: print CPU definitions in sorted order, David Hildenbrand, 2017/09/13
[Qemu-devel] [PATCH v5 16/22] s390x: allow cpu hotplug via device_add,
David Hildenbrand <=
[Qemu-devel] [PATCH v5 17/22] s390x: CPU hot unplug via device_del cannot work for now, David Hildenbrand, 2017/09/13
[Qemu-devel] [PATCH v5 18/22] s390x: implement query-hotpluggable-cpus, David Hildenbrand, 2017/09/13
[Qemu-devel] [PATCH v5 19/22] s390x: get rid of cpu_states and use possible_cpus instead, David Hildenbrand, 2017/09/13