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 <bhar...@linux.vnet.ibm.com>
 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 
             error_setg(errp, "CPU hot unplug not supported on this machine");
+        if (!kvm_enabled()) {
+            error_setg(errp, "CPU hot unplug not supported in TCG mode");
+            return;
+        }
         spapr_core_unplug(hotplug_dev, dev, errp);

Reply via email to