[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 10/10] s390x/cpu: Allow hot plug/unplug of CPUs
From: |
Matthew Rosato |
Subject: |
[Qemu-devel] [PATCH v3 10/10] s390x/cpu: Allow hot plug/unplug of CPUs |
Date: |
Wed, 27 Jan 2016 11:53:41 -0500 |
Allow hotplug of s390-cpu devices via device_add, and unplug
via device_del.
Signed-off-by: Matthew Rosato <address@hidden>
---
target-s390x/cpu.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c
index 46b1115..7160f33 100644
--- a/target-s390x/cpu.c
+++ b/target-s390x/cpu.c
@@ -31,6 +31,7 @@
#include "trace.h"
#ifndef CONFIG_USER_ONLY
#include "sysemu/arch_init.h"
+#include "hw/s390x/sclp.h"
#include "sysemu/sysemu.h"
#endif
@@ -225,6 +226,12 @@ static void s390_cpu_realizefn(DeviceState *dev, Error
**errp)
#endif
scc->parent_realize(dev, errp);
+
+#if !defined(CONFIG_USER_ONLY)
+ if (dev->hotplugged) {
+ raise_irq_cpu_hotplug();
+ }
+#endif
}
static void s390_cpu_initfn(Object *obj)
@@ -385,6 +392,10 @@ static void s390_cpu_class_init(ObjectClass *oc, void
*data)
scc->parent_realize = dc->realize;
dc->realize = s390_cpu_realizefn;
+ /* Necessary prep-work for s390-cpu is handled in
+ * instance_init() and realize(), so allow device_add */
+ 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;
--
1.9.1
- [Qemu-devel] [PATCH v3 00/10] Allow hotplug of s390 CPUs, Matthew Rosato, 2016/01/27
- [Qemu-devel] [PATCH v3 01/10] exec: Remove cpu from cpus list during cpu_exec_exit(), Matthew Rosato, 2016/01/27
- [Qemu-devel] [PATCH v3 10/10] s390x/cpu: Allow hot plug/unplug of CPUs,
Matthew Rosato <=
- [Qemu-devel] [PATCH v3 02/10] exec: Do vmstate unregistration from cpu_exec_exit(), Matthew Rosato, 2016/01/27
- [Qemu-devel] [PATCH v3 05/10] s390x/cpu: Cleanup init in preparation for hotplug, Matthew Rosato, 2016/01/27
- [Qemu-devel] [PATCH v3 08/10] s390x/cpu: Add functions to (un)register CPU state, Matthew Rosato, 2016/01/27
- [Qemu-devel] [PATCH v3 07/10] s390x/cpu: Move some CPU initialization into realize, Matthew Rosato, 2016/01/27
- [Qemu-devel] [PATCH v3 09/10] s390/virtio-ccw: Add hotplug handler and prepare for unplug, Matthew Rosato, 2016/01/27
- [Qemu-devel] [PATCH v3 03/10] cpu: Reclaim vCPU objects, Matthew Rosato, 2016/01/27
- [Qemu-devel] [PATCH v3 04/10] cpu: Add a sync version of cpu_remove(), Matthew Rosato, 2016/01/27
- [Qemu-devel] [PATCH v3 06/10] s390x/cpu: Set initial CPU state in common routine, Matthew Rosato, 2016/01/27