From: OGAWA Hirofumi Subject: Re: [PATCH] kvm: Fix kvmclock initialization on !CONFIG_KVM_GUEST Date: Sat, 18 Aug 2012 09:17:15 +0900 Message-ID: <87ehn5hx4k.fsf@devron.myhome.or.jp> References: <87393o1c8q.fsf@devron.myhome.or.jp> <20120816195747.GA10759@amt.cnet> <87vcgijs3h.fsf@devron.myhome.or.jp> <20120817175441.GA26255@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain Cc: Avi Kivity , kvm@vger.kernel.org To: Marcelo Tosatti Return-path: Received: from mail.parknet.co.jp ([210.171.160.6]:57767 "EHLO mail.parknet.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753673Ab2HRAR3 (ORCPT ); Fri, 17 Aug 2012 20:17:29 -0400 In-Reply-To: <20120817175441.GA26255@amt.cnet> (Marcelo Tosatti's message of "Fri, 17 Aug 2012 14:54:41 -0300") Sender: kvm-owner@vger.kernel.org List-ID: Marcelo Tosatti writes: >> Yes, it was an another option to fix this. As note, the wrong percpu >> usage (use it before initialization) is still true even if merged >> KVM_CLOCK. > > Its fine, i believe, because there is a percpu area for the "boot > processor" (see __per_cpu_offset at arch/x86/kernel/setup_percpu.c) > before proper initialization. Yes. I thought to use early_per_cpu() or similar though, finally I decided to make a patch with minimum logic change. > Can you please confirm the proposed config merge fixes the problem > for you? kvm-clock: Using msrs 4b564d01 and 4b564d00 kvm-clock: cpu 0, msr 0:1e80f01, boot clock ... kvm-clock: cpu 0, msr 0:3e3d2f01, primary cpu clock ... kvm-clock: cpu 1, msr 0:3e5d2f01, secondary cpu clock I confirmed kvm-clock of boot-cpu switched address properly with your patch (msr xxx:yyy is gpa). This fix the problem. - hypervisor. + hypervisor. It includes a paravirtualized clock, so that instead BTW, in the patch, above line is having the trailing space - "instead ". + of relying on a PIT (or probably other) emulation by the + underlying device model, the host provides the guest with + timing infrastructure such as time of day, and system time Thanks. -- OGAWA Hirofumi