From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56596) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmZSI-0002Ah-Ay for qemu-devel@nongnu.org; Wed, 21 Sep 2016 00:48:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmZSE-0001Ma-5k for qemu-devel@nongnu.org; Wed, 21 Sep 2016 00:48:21 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:54231) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmZSD-0001Lz-UT for qemu-devel@nongnu.org; Wed, 21 Sep 2016 00:48:18 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u8L4hKXL118272 for ; Wed, 21 Sep 2016 00:48:16 -0400 Received: from e28smtp05.in.ibm.com (e28smtp05.in.ibm.com [125.16.236.5]) by mx0a-001b2d01.pphosted.com with ESMTP id 25kb3jq6mv-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 21 Sep 2016 00:48:16 -0400 Received: from localhost by e28smtp05.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 21 Sep 2016 10:18:13 +0530 From: Bharata B Rao Date: Wed, 21 Sep 2016 10:18:00 +0530 Message-Id: <1474433280-25652-1-git-send-email-bharata@linux.vnet.ibm.com> Subject: [Qemu-devel] [RFC PATCH v0] spapr: Disable CPU unplug in TCG mode 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, Bharata B Rao CPU unplug doesn't work in TCG mode currently and causes frequent system freeze. In addition to other potential problems, the main problem arises of out the requirement to support synchronous removal of a CPU thread. The CPU thread that performs the cleanup of the unplugged CPU, kicks and waits for the unplugged CPU thread to finish. This wait never finishes in TCG mode when the waiting thread and the unplugged CPU thread are one and the same. So wait till proper MTTCG support is available before enabling CPU unplug in TCG mode. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index ca77bb0..d7864c6 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -2300,6 +2300,10 @@ static void spapr_machine_device_unplug(HotplugHandler *hotplug_dev, error_setg(errp, "CPU hot unplug not supported on this machine"); return; } + if (!kvm_enabled()) { + error_setg(errp, "CPU hot unplug not supported in TCG mode"); + return; + } spapr_core_unplug(hotplug_dev, dev, errp); } } -- 2.7.4