spapr: Prevent boot CPU core removal
PATCH 1/1 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 <[email protected]>
--- hw/ppc/spapr_cpu_core.c | 5 +++++ 1 file changed, 5 insertions(+)
hw/ppc/spapr_cpu_core.c +5 -0
@@ -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);
Signature · 1 line
2.7.4
Quoted 5 lines · 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 <[email protected]>
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"
Quoted 20 lines
--- hw/ppc/spapr_cpu_core.c | 5 +++++ 1 file changed, 5 insertions(+)hw/ppc/spapr_cpu_core.c +5
-0@@ -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);
Signature · 4 lines
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