From: Tim Deegan Subject: Re: Clock jumped 50 minutes in dom0 caused incorrect 2008 R2 domU time Date: Tue, 4 Jan 2011 17:22:39 +0000 Message-ID: <20110104172239.GC21948@whitby.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="iso-8859-1" Return-path: Content-Disposition: inline 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 At 17:09 +0000 on 04 Jan (1294160969), 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 > compatibility layer. Surely it turns it _on_, no? It does indeed help with Windows guests, in particular avoiding the vexing "STOP 101" bluescreen when Windows thinks one CPU hasn't seen timer interrupts for too long. > 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). > > Timer mode is apparently "0=delay virtual time when ticks are missed; > 1=virtual time is always wallclock time". > > To be honest I'm not entirely sure that those last two actually mean in > practice. Hopefully someone who understands this stuff will weigh in. Timer modes describe how guest-visible time and timer interrupts are updated when a VCPU is rescheduled: (2 is 'no-missed-ticks-pending') * delay_for_missed_ticks (default): * Do not advance a vcpu's time beyond the correct delivery time for * interrupts that have been missed due to preemption. Deliver missed * interrupts when the vcpu is rescheduled and advance the vcpu's * virtual * time stepwise for each one. * no_delay_for_missed_ticks: * As above, missed interrupts are delivered, but guest time always * tracks * wallclock (i.e., real) time while doing so. * no_missed_ticks_pending: * No missed interrupts are held pending. Instead, to ensure ticks are * delivered at some non-zero rate, if we detect missed ticks then the * internal tick alarm is not disabled if the VCPU is preempted during * the * next tick period. * one_missed_tick_pending: * Missed interrupts are collapsed together and delivered as one 'late * tick'. * Guest time always tracks wallclock (i.e., real) time. TBH, though, trying to figure out exactly how that interacts with a multi-processor OS that's trying to work backwards from timer values and interupts to a consistent wallclock time is, let's say, tricky. Mostly it's superstition of the "known to work best with OS foo" variety rather than deep understanding. Cheers, Tim. -- Tim Deegan Principal Software Engineer, Xen Platform Team Citrix Systems UK Ltd. (Company #02937203, SL9 0BG)