From mboxrd@z Thu Jan 1 00:00:00 1970 From: ANNIE LI Subject: how to keep time of windows pvhvm synchronized with host after resuming Date: Thu, 16 Sep 2010 16:30:56 +0800 Message-ID: <4C91D5C0.5030802@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org 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