WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] common time reference between domU and dom0

To: Keir Fraser <keir@xxxxxxx>, James Harper <james.harper@xxxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: RE: [Xen-devel] common time reference between domU and dom0
From: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Date: Fri, 10 Dec 2010 12:24:13 -0800 (PST)
Cc:
Delivery-date: Fri, 10 Dec 2010 12:26:15 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C927B534.C5BA%keir@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <AEC6C66638C05B468B556EA548C1A77D01BB8980@trantor C927B534.C5BA%keir@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
> >>> How is this exposed for HVM systems?
> >>
> >> Given all HVM guest time sources are trapped to the hypervisor,
> > including
> >> TSC, you may as well just use the HVMOP_get_time hypercall.
> >>
> >
> > Is that a new call? I don't see it mentioned in 4.0-testing anywhere.
> 
> Yeah I think it's in 4.1 only.
> 
> > Is there a fallback if HVMOP_get_time doesn't exist?
> 
> Switch on vtsc (might be default) and just use RDTSC? Might be good
> enough.
> I'm not sure that computing system time yourself from fields in shared
> info
> works well for HVM guests. HVMOP_get_time I think had been in XenServer
> patch queue a while and has just been pulled across to upstream.

I believe vtsc will be different in different domains as I believe
Xen adjusts it so tsc in any guest effectively starts at zero at time
of domain launch.  Also, an HVM domain may "write" to tsc and
change its effective value.

Also, I'm not sure IIRC, but I think vtsc is never on for dom0.

And IIRC the default for vtsc (vtsc=0) is dependent on the underlying
hardware and events (such as migration/save/restore) that transpire.
It can be forced on in a vm config file (but again IIRC not for dom0).

See xen-XXX.hg/docs/misc/tscmode.txt for XXX >= 4.0

Dan

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