From patchwork Fri Mar 2 14:12:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 144268 X-Patchwork-Delegate: galak@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id B6012100812 for ; Sat, 3 Mar 2012 01:13:27 +1100 (EST) Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx2.suse.de", Issuer "CAcert Class 3 Root" (not verified)) by ozlabs.org (Postfix) with ESMTPS id E0BE21007D3 for ; Sat, 3 Mar 2012 01:12:39 +1100 (EST) Received: from relay1.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id AFED4919A3; Fri, 2 Mar 2012 15:12:34 +0100 (CET) From: Alexander Graf To: kvm-ppc@vger.kernel.org Subject: [PATCH] PPC: Don't sync timebase when inside VM Date: Fri, 2 Mar 2012 15:12:33 +0100 Message-Id: <1330697553-27156-1-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.7.3.4 Cc: Scott Wood , linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org 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 Signed-off-by: Alexander Graf --- 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