Re: [PATCH] PPC: Don't sync timebase when inside VM
flat view
From: Alexander Graf <hidden>
Date: 2012-03-02 16:30:10
Also in:
kvm
On 02.03.2012, at 17:20, Scott Wood wrote:
On Fri, Mar 02, 2012 at 03:12:33PM +0100, Alexander Graf wrote:quoted
When running inside a virtual machine, we can not modify timebase, so let's just not call the functions for it then. =20 This resolves hangs when booting e500 SMP guests on overcommitted =
hosts.
quoted
=20 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(-) =20diff --git a/arch/powerpc/platforms/85xx/smp.c =
b/arch/powerpc/platforms/85xx/smp.c
quoted
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 =3D doorbell_cause_ipi; } =20 + /* When running under a hypervisor, we can not modify tb */ + np =3D of_find_node_by_path("/hypervisor"); + if (np) { + smp_85xx_ops.give_timebase =3D NULL; + smp_85xx_ops.take_timebase =3D NULL; + } + smp_ops =3D &smp_85xx_ops;=20 Again, for 85xx we should *never* sync the timebase in the kernel, hypervisor or no.
The code says "if the kexec config option is enabled, do the sync". I'm =
fairly sure it's there for a reason.
Git blame points to the following commit:
commit f933a41e419a954ef90605224e02c3ded78f3372
Author: Matthew McClintock [off-list ref]
Date: Wed Jul 21 16:14:53 2010 -0500
powerpc/85xx: kexec for SMP 85xx BookE systems
=20
Adds support for kexec on 85xx machines for the BookE platform.
Including support for SMP machines
=20
Based off work from Maxim Uvarov [off-list ref]
Signed-off-by: Matthew McClintock [off-list ref]
Signed-off-by: Kumar Gala [off-list ref]
Alex