Thread (10 messages) 10 messages, 3 authors, 2013-07-22

[PATCH] PPC: Don't sync timebase when inside VM

flat view
STALE4833d

From: Alexander Graf <hidden>
Date: 2012-03-02 14:12:39
Also in: kvm
Subsystem: linux for powerpc (32-bit and 64-bit), linux for powerpc embedded ppc85xx, the rest · Maintainers: Madhavan Srinivasan, Scott Wood, Linus Torvalds

When running inside a virtual machine, we can not modify timebase, so
let's just not call the functions for it then.

This resolves hangs when booting e500 SMP guests on overcommitted hosts.

Reported-by: Stuart Yoder <redacted>
Signed-off-by: Alexander Graf <redacted>
---
 arch/powerpc/platforms/85xx/smp.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c
index ff42490..d4b6c1f 100644
--- a/arch/powerpc/platforms/85xx/smp.c
+++ b/arch/powerpc/platforms/85xx/smp.c
@@ -249,6 +249,13 @@ void __init mpc85xx_smp_init(void)
 		smp_85xx_ops.cause_ipi = doorbell_cause_ipi;
 	}
 
+	/* When running under a hypervisor, we can not modify tb */
+	np = of_find_node_by_path("/hypervisor");
+	if (np) {
+		smp_85xx_ops.give_timebase = NULL;
+		smp_85xx_ops.take_timebase = NULL;
+	}
+
 	smp_ops = &smp_85xx_ops;
 
 #ifdef CONFIG_KEXEC
-- 
1.6.0.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help