From: Tim Deegan Subject: Re: how to keep time of windows pvhvm synchronized with host after resuming Date: Fri, 24 Sep 2010 16:18:26 +0100 Message-ID: <20100924151826.GC24250@whitby.uk.xensource.com> References: <4C91D5C0.5030802@oracle.com> <291EDFCB1E9E224A99088639C47620228CF769FEC1@LONPMAILBOX01.citrite.net> <20100916091914.GC11387@whitby.uk.xensource.com> <4C9346AA.4040902@oracle.com> <20100917114304.GE11387@whitby.uk.xensource.com> <4C99C385.3040602@oracle.com> <20100923081912.GC22692@whitby.uk.xensource.com> <4C9CAD6D.3030803@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Return-path: Content-Disposition: inline In-Reply-To: <4C9CAD6D.3030803@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: ANNIE LI Cc: Paul Durrant , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org At 14:53 +0100 on 24 Sep (1285340029), ANNIE LI wrote: > > I had expected arch_set_info_guest() to be called for every vcpu in the > > HVM guest on restore, because boot_vcpu() is called from hvm_load_cpu_ctxt(). > arch_set_info_guest is called when vm is booting, but it is not called > on HVM guest restore. > I will check boot_vcpu() and hvm_load_cpu_ctxt() further. > > Yes, do_settime() updates the master copy of wc_sec and wc_nsec from its > > inputs, and then copies them to all domains' private copies. So the > > question is: > > - is the _master_ copy of wc_sec always zero; or > From my recent logs, wc_sec is not zero, but it always keeps as certain > unchanged value. In do_settime(...), > Input parameters secs, nsecs and system_time_base change every time when > calling this function. But wc_secs > keep unchanged although it is calculated from those 3 parameters by: > (secs * 1000000000ULL) + (u64)nsecs - system_time_base; > Anything wrong here? No, that's fine. wc_secs is what you add to NOW() to get wallclock to it shouldn't change, or at least very rarely. I thought from your earlier email that it was always zero, which would be odd. > > - is the master copy right and the HVM domain's copy wrong; or > Is update_domain_wallclock_time doing HVM domain's copy? From my log, > wc_secs of HVM domain's copy is > same as that of master copy. That's reassuring. > > - is the HVM domain's copy right as seen from Xen but > > wrong as seen from the tools inside the guest? > wc_secs value from tools inside the guest is same as HVM domain's copy. And is that equal to zero? If not, what exactly is the problem? I think I've got confused about what's going wrong. Cheers, Tim. -- Tim Deegan Principal Software Engineer, XenServer Engineering Citrix Systems UK Ltd. (Company #02937203, SL9 0BG)