xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Mark Adams <mark@campbell-lange.net>
To: Gianni Tedesco <gianni.tedesco@citrix.com>
Cc: wei song <james.songwei@gmail.com>,
	xen devel <xen-devel@lists.xensource.com>,
	Ian Campbell <Ian.Campbell@citrix.com>
Subject: Re: Clock jumped 50 minutes in dom0 caused incorrect 2008 R2 domU time
Date: Wed, 5 Jan 2011 12:03:28 +0000	[thread overview]
Message-ID: <20110105120328.GA10024@campbell-lange.net> (raw)
In-Reply-To: <1294162083.12018.19.camel@qabil.uk.xensource.com>

On Tue, Jan 04, 2011 at 05:28:02PM +0000, Gianni Tedesco wrote:
> 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
> 
> 

All, Thanks for input. Do you agree that the -best- setting to maintain
stable time for 2008 R2 hvm guests is to use timer_mode = 2, tsc_mode =
1 and viridian = 1 ?

Best Regards,
Mark

> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

      reply	other threads:[~2011-01-05 12:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-06 11:16 Clock jumped 50 minutes in dom0 caused incorrect 2008 R2 domU time Mark Adams
2010-10-06 12:20 ` Clock jumped 50 minutes in dom0 caused incorrect 2008R2 " James Harper
2010-10-06 12:24 ` James Harper
2010-10-06 13:04   ` Mark Adams
2010-10-06 15:41 ` Clock jumped 50 minutes in dom0 caused incorrect 2008 R2 " Jeremy Fitzhardinge
2010-10-06 16:15   ` Mark Adams
2010-10-06 16:23     ` Jeremy Fitzhardinge
2010-10-07 14:04       ` Dan Magenheimer
2010-10-26  9:22         ` Mark Adams
2010-10-26 17:03           ` Jeremy Fitzhardinge
2010-10-26 21:54             ` Dan Magenheimer
2010-10-27 20:29               ` Dan Magenheimer
2011-01-04 17:00                 ` Mark Adams
     [not found] ` <AANLkTinDMfrR5u2k3kPJfJ9Z+op53v6ziEYnLEO03FkG@mail.gmail.com>
     [not found]   ` <20101008100907.GH30044@campbell-lange.net>
2010-10-09  2:15     ` wei song
2010-10-11 10:10       ` Mark Adams
2011-01-04 17:09         ` Ian Campbell
2011-01-04 17:22           ` Tim Deegan
2011-01-04 17:27             ` Ian Campbell
2011-01-04 17:28           ` Gianni Tedesco
2011-01-05 12:03             ` Mark Adams [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110105120328.GA10024@campbell-lange.net \
    --to=mark@campbell-lange.net \
    --cc=Ian.Campbell@citrix.com \
    --cc=gianni.tedesco@citrix.com \
    --cc=james.songwei@gmail.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).