From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] tsc: use kvmclock for calibration Date: Sun, 12 Aug 2012 12:01:57 +0300 Message-ID: <50277105.8070909@redhat.com> References: <1344513463-7329-1-git-send-email-kraxel@redhat.com> <5023B2C4.90302@redhat.com> <20120809185900.GD20889@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Gerd Hoffmann , seabios@seabios.org, kvm@vger.kernel.org To: Marcelo Tosatti Return-path: Received: from mx1.redhat.com ([209.132.183.28]:11476 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751188Ab2HLJCP (ORCPT ); Sun, 12 Aug 2012 05:02:15 -0400 In-Reply-To: <20120809185900.GD20889@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: On 08/09/2012 09:59 PM, Marcelo Tosatti wrote: >> >> > + wrmsr(msr, 0); >> > + if (time.version < 2 || time.tsc_to_system_mul == 0) >> > + return 0; >> > + >> > + /* go figure tsc frequency */ >> > + khz = pvclock_tsc_khz(&time); >> > + dprintf(1, "Using kvmclock, msr 0x%x, tsc %d MHz\n", >> > + msr, (u32)khz / 1000); >> > + return khz; >> >> That's a meaningless number. You can be migrated to a cpu or a machine >> with very different tsc. > > Thats why there exists hardware tsc frequency scaling and the software > equivalent for that on kvm. > The hardware is only available on a minority of processors in the field. The software equivalent isn't there. -- error compiling committee.c: too many arguments to function