From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH] Fix kvmclock on !constant_tsc boxes. Date: Sun, 8 Feb 2009 04:08:56 -0200 Message-ID: <20090208060856.GC4437@amt.cnet> References: <4989C7B4.10508@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: KVM list To: Gerd Hoffmann Return-path: Received: from mx2.redhat.com ([66.187.237.31]:43352 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750737AbZBHGJM (ORCPT ); Sun, 8 Feb 2009 01:09:12 -0500 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n1869CTv029491 for ; Sun, 8 Feb 2009 01:09:12 -0500 Content-Disposition: inline In-Reply-To: <4989C7B4.10508@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Feb 04, 2009 at 05:52:04PM +0100, Gerd Hoffmann wrote: > Hi folks, > > kvmclock currently falls apart on machines without constant tsc. > This patch fixes it. Changes: > > * keep tsc frequency in a per-cpu variable. > * handle kvmclock update using a new request flag, thus checking > whenever we need an update each time we enter guest context. > * use a cpufreq notifier to track frequency changes and force > kvmclock updates. > * send ipis to kick cpu out of guest context if needed to make > sure the guest doesn't see stale values. > > cheers, > Gerd ACK for 2.6.29 (but please fix the whitespace breakage).