From: Matthew Rosato <mjrosato@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: agraf@suse.de, borntraeger@de.ibm.com, cornelia.huck@de.ibm.com,
pbonzini@redhat.com, afaerber@suse.de, rth@twiddle.net
Subject: [Qemu-devel] [PATCH v2 9/9] s390x/cpu: Allow hot plug/unplug of CPUs
Date: Thu, 19 Nov 2015 10:10:14 -0500 [thread overview]
Message-ID: <1447945814-15765-10-git-send-email-mjrosato@linux.vnet.ibm.com> (raw)
In-Reply-To: <1447945814-15765-1-git-send-email-mjrosato@linux.vnet.ibm.com>
Allow hotplug of s390-cpu devices via device_add, and unplug
via device_del.
Signed-off-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com>
---
target-s390x/cpu.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c
index 4b83a09..a4be7b7 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)
@@ -398,6 +405,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
prev parent reply other threads:[~2015-11-19 15:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-19 15:10 [Qemu-devel] [PATCH v2 0/9] s390: Allow hotplug of s390 CPUs Matthew Rosato
2015-11-19 15:10 ` [Qemu-devel] [PATCH v2 1/9] cpus: Reclaim vCPU objects Matthew Rosato
2015-11-20 2:33 ` Bharata B Rao
2015-11-20 13:37 ` Matthew Rosato
2015-11-19 15:10 ` [Qemu-devel] [PATCH v2 2/9] cpus: Add a sync version of cpu_remove() Matthew Rosato
2015-11-19 15:25 ` Paolo Bonzini
2015-11-19 15:36 ` Matthew Rosato
2015-11-19 15:10 ` [Qemu-devel] [PATCH v2 3/9] s390x/cpu: Cleanup init in preparation for hotplug Matthew Rosato
2015-11-19 15:10 ` [Qemu-devel] [PATCH v2 4/9] s390x/cpu: Set initial CPU state in common routine Matthew Rosato
2015-11-19 15:10 ` [Qemu-devel] [PATCH v2 5/9] s390x/cpu: Move some CPU initialization into realize Matthew Rosato
2015-11-19 15:10 ` [Qemu-devel] [PATCH v2 6/9] s390x/cpu: Add functions to (un)register CPU state Matthew Rosato
2015-11-19 15:10 ` [Qemu-devel] [PATCH v2 7/9] s390x/cpu: Extra cleanup during CPU finalize Matthew Rosato
2015-11-19 15:10 ` [Qemu-devel] [PATCH v2 8/9] s390/virtio-ccw: Add hotplug handler and prepare for unplug Matthew Rosato
2015-11-19 15:10 ` Matthew Rosato [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1447945814-15765-10-git-send-email-mjrosato@linux.vnet.ibm.com \
--to=mjrosato@linux.vnet.ibm.com \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=borntraeger@de.ibm.com \
--cc=cornelia.huck@de.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).