qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC PATCH v0] spapr: Disable CPU unplug in TCG mode
@ 2016-09-21  4:48 Bharata B Rao
  2016-09-21  5:02 ` no-reply
  2016-09-21  5:31 ` David Gibson
  0 siblings, 2 replies; 5+ messages in thread
From: Bharata B Rao @ 2016-09-21  4:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-ppc, david, 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 <bharata@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 *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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-09-30  3:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-21  4:48 [Qemu-devel] [RFC PATCH v0] spapr: Disable CPU unplug in TCG mode Bharata B Rao
2016-09-21  5:02 ` no-reply
2016-09-21  5:05   ` Fam Zheng
2016-09-21  5:31 ` David Gibson
2016-09-30  3:22   ` Bharata B Rao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).