From: ANNIE LI <annie.li@oracle.com>
To: Tim Deegan <Tim.Deegan@citrix.com>
Cc: Paul Durrant <Paul.Durrant@citrix.com>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: how to keep time of windows pvhvm synchronized with host after resuming
Date: Fri, 17 Sep 2010 22:37:36 +0800 [thread overview]
Message-ID: <4C937D30.2050209@oracle.com> (raw)
In-Reply-To: <20100917114304.GE11387@whitby.uk.xensource.com>
[-- Attachment #1.1: Type: text/plain, Size: 3160 bytes --]
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@lists.xensource.com<mailto:xen-devel-bounces@lists.xensource.com> [mailto:xen-devel-
>> bounces@lists.xensource.com<mailto:bounces@lists.xensource.com>] On Behalf Of ANNIE LI
>> Sent: 16 September 2010 09:31
>> To: xen-devel@lists.xensource.com<mailto:xen-devel@lists.xensource.com>
>> 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@lists.xensource.com<mailto:Xen-devel@lists.xensource.com>
>> http://lists.xensource.com/xen-devel
>>
>>
>>
>> Content-Description: ATT00001..txt
>>
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xensource.com<mailto:Xen-devel@lists.xensource.com>
>> http://lists.xensource.com/xen-devel
>>
>>
>>
>>
>>
>>
>
>
[-- Attachment #1.2: Type: text/html, Size: 4569 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2010-09-17 14:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-16 8:30 how to keep time of windows pvhvm synchronized with host after resuming ANNIE LI
2010-09-16 8:59 ` Paul Durrant
2010-09-16 9:19 ` Tim Deegan
2010-09-16 10:00 ` ANNIE LI
2010-09-17 10:44 ` ANNIE LI
2010-09-17 11:43 ` Tim Deegan
2010-09-17 14:37 ` ANNIE LI [this message]
2010-09-22 8:51 ` ANNIE LI
2010-09-23 8:19 ` Tim Deegan
2010-09-24 13:53 ` ANNIE LI
2010-09-24 15:18 ` Tim Deegan
2010-09-25 2:26 ` ANNIE LI
2010-09-25 7:27 ` ANNIE LI
2010-09-27 9:53 ` Tim Deegan
2010-09-28 3:54 ` ANNIE LI
2010-09-28 9:00 ` Tim Deegan
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=4C937D30.2050209@oracle.com \
--to=annie.li@oracle.com \
--cc=Paul.Durrant@citrix.com \
--cc=Tim.Deegan@citrix.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.