提交 62be8b04 编写于 作者: B Bharata B Rao 提交者: David Gibson

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: NBharata B Rao <bharata@linux.vnet.ibm.com>
[dwg: Tweaked error message for clarity]
Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
上级 bcd510b1
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册