* [Qemu-devel] [PATCH 1/1] spapr: Prevent boot CPU core removal
@ 2016-07-27 5:14 Bharata B Rao
2016-07-27 6:11 ` David Gibson
0 siblings, 1 reply; 2+ messages in thread
From: Bharata B Rao @ 2016-07-27 5:14 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-ppc, david, imammedo, Bharata B Rao
Boot CPU is assumed to be always present in QEMU code. So
until that assumptions are gone, deny removal request.
In another words, QEMU won't support boot CPU core hot-unplug.
Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
---
hw/ppc/spapr_cpu_core.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c
index 5a132bf..0dadf48 100644
--- a/hw/ppc/spapr_cpu_core.c
+++ b/hw/ppc/spapr_cpu_core.c
@@ -133,6 +133,11 @@ void spapr_core_unplug(HotplugHandler *hotplug_dev, DeviceState *dev,
sPAPRDRConnectorClass *drck;
Error *local_err = NULL;
+ if (index == 0) {
+ error_setg(errp, "Boot CPU core is unpluggable");
+ return;
+ }
+
g_assert(drc);
drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc);
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH 1/1] spapr: Prevent boot CPU core removal
2016-07-27 5:14 [Qemu-devel] [PATCH 1/1] spapr: Prevent boot CPU core removal Bharata B Rao
@ 2016-07-27 6:11 ` David Gibson
0 siblings, 0 replies; 2+ messages in thread
From: David Gibson @ 2016-07-27 6:11 UTC (permalink / raw)
To: Bharata B Rao; +Cc: qemu-devel, qemu-ppc, imammedo
[-- Attachment #1: Type: text/plain, Size: 1319 bytes --]
On Wed, Jul 27, 2016 at 10:44:42AM +0530, Bharata B Rao wrote:
> Boot CPU is assumed to be always present in QEMU code. So
> until that assumptions are gone, deny removal request.
> In another words, QEMU won't support boot CPU core hot-unplug.
>
> Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Applied to ppc-for-2.7, but I've changed the message slightly to avoid
the ambiguity between:
un-pluggable - "may not be plugged (or unplugged)"
unplug-able - "may be unplugged"
> ---
> hw/ppc/spapr_cpu_core.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c
> index 5a132bf..0dadf48 100644
> --- a/hw/ppc/spapr_cpu_core.c
> +++ b/hw/ppc/spapr_cpu_core.c
> @@ -133,6 +133,11 @@ void spapr_core_unplug(HotplugHandler *hotplug_dev, DeviceState *dev,
> sPAPRDRConnectorClass *drck;
> Error *local_err = NULL;
>
> + if (index == 0) {
> + error_setg(errp, "Boot CPU core is unpluggable");
> + return;
> + }
> +
> g_assert(drc);
>
> drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc);
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-07-27 6:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-27 5:14 [Qemu-devel] [PATCH 1/1] spapr: Prevent boot CPU core removal Bharata B Rao
2016-07-27 6:11 ` David Gibson
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).