From: Gianni Tedesco Subject: Re: Clock jumped 50 minutes in dom0 caused incorrect 2008 R2 domU time Date: Tue, 4 Jan 2011 17:28:02 +0000 Message-ID: <1294162083.12018.19.camel@qabil.uk.xensource.com> References: <20101006111618.GA31233@campbell-lange.net> <20101008100907.GH30044@campbell-lange.net> <20101011101015.GA17511@campbell-lange.net> <1294160969.3831.609.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1294160969.3831.609.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Campbell Cc: wei song , xen devel , Mark Adams List-Id: xen-devel@lists.xenproject.org On Tue, 2011-01-04 at 17:09 +0000, Ian Campbell wrote: > Which ever one of you started it: Please don't top post. > > > On Sat, Oct 09, 2010 at 10:15:20AM +0800, wei song wrote: > > > added timer_mode =2 and tsc_mode = 1 and viridian=1 into your configure > > > file. > > On Mon, 2010-10-11 at 11:10 +0100, Mark Adams wrote: > > I can try this, but can you please confirm what these options do? > > viridian=1 turns off support for the Hyper-V virtualisation ^^^ on ;) > compatibility layer. Not many of these are actually supported but AFAIK > one or two are and can affect the behaviour of Win2008 (although you > would hope it was for the better!) > > According to xmexample.hvm: tsc_mode : TSC mode (0=default, 1=native > TSC, 2=never emulate, 3=pvrdtscp). >From xen/include/asm-x86/time.h: /* * PV TSC emulation modes: * 0 = guest rdtsc/p executed natively when monotonicity can be guaranteed * and emulated otherwise (with frequency scaled if necessary) * 1 = guest rdtsc/p always emulated at 1GHz (kernel and user) * 2 = guest rdtsc always executed natively (no monotonicity/frequency * guarantees); guest rdtscp emulated at native frequency if * unsupported by h/w, else executed natively * 3 = same as 2, except xen manages TSC_AUX register so guest can * determine when a restore/migration has occurred and assumes * guest obtains/uses pvclock-like mechanism to adjust for * monotonicity and frequency changes */ > > Timer mode is apparently "0=delay virtual time when ticks are missed; > 1=virtual time is always wallclock time". It's all explained in xen/include/public/hvm/params.h AIUI, timer_mode=0 means if timer ticks were missed then they all get re-injected in to the guest when next run. IOW if 5 ticks were missed you get 5 IRQ's in succession and the clock time is incremented stepwise with them. I think it should never be used unless the OS simply counts ticks to figure out the time (which they don't). 1 is default and means the same except virtual time is always up to date when re-injecting missed ticks. 3 i'm not sure about but sounds like some variant of 4? 4 is where missed ticks delivered in one 'late tick' Gianni