From mboxrd@z Thu Jan 1 00:00:00 1970 From: Glauber de Oliveira Costa Subject: Re: [PATCH 2/2] kvmclock implementation, the guest part. Date: Thu, 17 Jan 2008 10:52:30 -0200 Message-ID: <478F4F8E.2060007@redhat.com> References: <1200501067774-git-send-email-gcosta@redhat.com> <12005010761561-git-send-email-gcosta@redhat.com> <1200501082989-git-send-email-gcosta@redhat.com> <478F0BBE.1010507@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, jeremy-TSDbQ3PG+2Y@public.gmane.org, avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org To: Gerd Hoffmann Return-path: In-Reply-To: <478F0BBE.1010507-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Gerd Hoffmann wrote: >> +struct shared_info shared_info __attribute__((__aligned__(PAGE_SIZE))); > > leftover from old version? > >> +unsigned long kvm_get_wallclock(void) >> +{ >> + u32 wc_sec, wc_nsec; >> + u64 delta, last_tsc; >> + struct timespec ts; >> + int version, nsec, cpu = smp_processor_id(); >> + >> + native_write_msr(MSR_KVM_WALL_CLOCK, __pa(&wall_clock)); > > Huh? Shouldn't that be done once at boot time? > > cheers, > Gerd > > It can, but I don't think so. The closer to read we do, the more precision we get on unstable tsc systems. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/