From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tokarev Subject: Re: 2.6.35-rc1 regression with pvclock and smp guests Date: Tue, 28 Sep 2010 11:16:29 +0000 (UTC) Message-ID: References: <4C4D4B8B.80006@amd.com> <4C4DDB00.50203@xutrox.com> <4C4F48D0.8090609@xutrox.com> <4C500872.1020809@redhat.com> <4C536F80.5090205@xutrox.com> <4C538CCE.1010104@redhat.com> <4C540EC9.1010008@xutrox.com> <4C54512B.6000307@xutrox.com> <4C54B7DE.4060901@redhat.com> <20100802144300.GD14448@mothafucka.localdomain> <4C5729F6.2050605@redhat.com> <4C573A20.6030001@xutrox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org Return-path: Received: from lo.gmane.org ([80.91.229.12]:34387 "EHLO lo.gmane.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750885Ab0I1LUH (ORCPT ); Tue, 28 Sep 2010 07:20:07 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1P0YE9-0006xW-GZ for kvm@vger.kernel.org; Tue, 28 Sep 2010 13:20:05 +0200 Received: from broadband-95-84-245-172.nationalcablenetworks.ru ([95.84.245.172]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 Sep 2010 13:20:05 +0200 Received: from mjt by broadband-95-84-245-172.nationalcablenetworks.ru with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 Sep 2010 13:20:05 +0200 Sender: kvm-owner@vger.kernel.org List-ID: Arjan Koers <0h61vkll2ly8 xutrox.com> writes: [] > I've attached the printk patches for 2.6.34.1 and 2.6.35, in case > anyone needs them... > > > Move a printk that's using the clock before it's ready > > Fix a hang during SMP kernel boot on KVM that showed up > after commit 489fb490dbf8dab0249ad82b56688ae3842a79e8 > (2.6.35) and 59aab522154a2f17b25335b63c1cf68a51fb6ae0 > (2.6.34.1). The problem only occurs when > CONFIG_PRINTK_TIME is set. > > Signed-off-by: Arjan Koers <0h61vkll2ly8 xutrox.com> > > diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c > index feaeb0d..71bf2df 100644 > --- a/arch/x86/kernel/kvmclock.c > +++ b/arch/x86/kernel/kvmclock.c > @@ -125,12 +125,15 @@ static struct clocksource kvm_clock = { > static int kvm_register_clock(char *txt) > { > int cpu = smp_processor_id(); > - int low, high; > + int low, high, ret; > + > low = (int)__pa(&per_cpu(hv_clock, cpu)) | 1; > high = ((u64)__pa(&per_cpu(hv_clock, cpu)) >> 32); > + ret = native_write_msr_safe(MSR_KVM_SYSTEM_TIME, low, high); > printk(KERN_INFO "kvm-clock: cpu %d, msr %x:%x, %s\n", > cpu, high, low, txt); > - return native_write_msr_safe(MSR_KVM_SYSTEM_TIME, low, high); > + > + return ret; > } > > #ifdef CONFIG_X86_LOCAL_APIC Folks, should this be sent to -stable kernel? It is not in any upstream kernel as far as I can see (not in linus tree too), but this is quite an issue and is hitting people.... The discussion were stalled quite a while ago too -- this email has Date: Mon, 02 Aug 2010 23:35:28 +0200. Thanks! /mjt