diff options
author | Bharata B Rao <bharata@linux.vnet.ibm.com> | 2016-07-27 10:44:42 +0530 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2016-07-29 12:02:31 +1000 |
commit | 62be8b044adf47327ebefdefb25f28a40316ebd0 (patch) | |
tree | 2240ff0961d54240786ce98dfe9a474960da4d9a | |
parent | bcd510b141eee18b7fcd445f8c9ea3be347d16fc (diff) | |
download | qemu-62be8b044adf47327ebefdefb25f28a40316ebd0.zip qemu-62be8b044adf47327ebefdefb25f28a40316ebd0.tar.gz qemu-62be8b044adf47327ebefdefb25f28a40316ebd0.tar.bz2 |
spapr: Prevent boot CPU core removal
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>
[dwg: Tweaked error message for clarity]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r-- | hw/ppc/spapr_cpu_core.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c index 5a132bf..ec81ee6 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 may not be unplugged"); + return; + } + g_assert(drc); drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc); |