From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50434) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSHBQ-0002ib-4x for qemu-devel@nongnu.org; Wed, 27 Jul 2016 01:15:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSHBL-0006yd-6z for qemu-devel@nongnu.org; Wed, 27 Jul 2016 01:15:03 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:39942) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSHBK-0006yT-Um for qemu-devel@nongnu.org; Wed, 27 Jul 2016 01:14:59 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u6R5ANfR063181 for ; Wed, 27 Jul 2016 01:14:57 -0400 Received: from e23smtp03.au.ibm.com (e23smtp03.au.ibm.com [202.81.31.145]) by mx0a-001b2d01.pphosted.com with ESMTP id 24dyqpbu5w-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 27 Jul 2016 01:14:57 -0400 Received: from localhost by e23smtp03.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 27 Jul 2016 15:14:55 +1000 From: Bharata B Rao Date: Wed, 27 Jul 2016 10:44:42 +0530 Message-Id: <1469596482-4048-1-git-send-email-bharata@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 1/1] spapr: Prevent boot CPU core removal List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, david@gibson.dropbear.id.au, imammedo@redhat.com, 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 --- 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