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] how to keep time of windows pvhvm synchronized with host

To: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Subject: Re: [Xen-devel] how to keep time of windows pvhvm synchronized with host after resuming
From: ANNIE LI <annie.li@xxxxxxxxxx>
Date: Fri, 17 Sep 2010 22:37:36 +0800
Cc: Paul Durrant <Paul.Durrant@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 17 Sep 2010 07:39:41 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20100917114304.GE11387@xxxxxxxxxxxxxxxxxxxxxxx>
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>
Organization: Oracle Corporation
References: <4C91D5C0.5030802@xxxxxxxxxx> <291EDFCB1E9E224A99088639C47620228CF769FEC1@xxxxxxxxxxxxxxxxxxxxxxxxx> <20100916091914.GC11387@xxxxxxxxxxxxxxxxxxxxxxx> <4C9346AA.4040902@xxxxxxxxxx> <20100917114304.GE11387@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.24 (Windows/20100228)


Tim Deegan wrote:

Not that I can remember.  You could try scattering printks in 
hvm_latch_shinfo_size() to see if it's getting called at all,
and in arch_set_info_guest() to see if it's calling
update_domain_wallclock_time() like it should. 
  
Thanks, I will add log into those functions to see...

Thanks
Annie
Tim.
 
  
Thanks
Annie


One problem with using wc_[n]sec to get the wallclock time is that the
usual Xen way to get the system time is to interpolate it from the RDTSC
value and the per-vcpu time info, but in a HVM guest the OS may have
changed the TSC offset to something that the driver can't figure out.
The Citrix PV drivers use the HVMOP_get_time hypercall to get the system
time instead; that hypercall is in xen-unstable but not the 4.0 branch.

If you're using a linux guest with Stefano's pv-on-hvm patches then I
think you should be able to read the PV system time as normal.

Tim.



  Paul



-----Original Message-----
From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx<mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx> [mailto:xen-devel-
bounces@xxxxxxxxxxxxxxxxxxx<mailto:bounces@xxxxxxxxxxxxxxxxxxx>] On Behalf Of ANNIE LI
Sent: 16 September 2010 09:31
To: xen-devel@xxxxxxxxxxxxxxxxxxx<mailto:xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] how to keep time of windows pvhvm synchronized
with host after resuming

Hi

When the virtual machine is resumed from suspend, the guest
operating
system's wall-clock time remains at the value it had at the time of
the
suspension. For linux pvm, we can avoid resolve issue by setting
independent_wallclock=0. However, HVM(or PVHVM) does not support
this
feature.

I did some investigation on how to implement this in windows
para-virtualization driver. In \include\xen\interface\xen.h, there
are
several variables about timer such as: wc_sec and wc_nsec, and
vcpu_time_info struct. It is very strange, wc_sec and wc_nsec is
always
zero for my windows vm with para-virtualization driver.
Vcpu_time_info
only contains time info for specific vcpu. Should i use those
variables
to get accurate time for VM? Is there any corresponding source code
or
algorithms available now? Is it safe to simply update vm time after
resuming?

Citrix 5.6 Windows para-virtualization driver will notify windows
kernel
time change after resuming, and resumed windows vm with Citrix pv
driver
can keep it's time synchronized with host. Would you like to give me
some clues about how to implement this?

Any help is greatly appreciated.

Thanks
Annie

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



Content-Description: ATT00001..txt


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





    

  
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>