From: "Jan Beulich" Subject: Re: [PATCH v3 for 4.5] x86/viridian: Freeze time reference counter when domain is paused Date: Tue, 21 Oct 2014 16:22:16 +0100 Message-ID: <544696480200007800040BE8@mail.emea.novell.com> References: <1413451271-47779-1-git-send-email-paul.durrant@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XgbGN-0003ns-Du for xen-devel@lists.xenproject.org; Tue, 21 Oct 2014 15:22:19 +0000 In-Reply-To: <1413451271-47779-1-git-send-email-paul.durrant@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini , Ian Campbell , Tim Deegan Cc: xen-devel@lists.xenproject.org, Paul Durrant List-Id: xen-devel@lists.xenproject.org >>> On 16.10.14 at 11:21, wrote: > In XenServer system test it has become apparent that versions of Windows > that make use of the time reference counter enlightenment cannot cope with > large jumps forward in the value read from the MSR. Specifically, > suspending a very large domain took approx. 45 minutes to complete and > when the domain was resumed it was discovered that the WMI (Windows > Management Instrumentation) service had hung. > > The reason a large jump forward is seen by the guest is that, when a guest > is suspended, the guest stops running when the SCHEDOP_suspend hypercall is > made, however the MSR value essentially keeps incrementing until the > tool-stack issues DOMCTL_gethvmcontext. > > This patch adds code to freeze the value of the time reference counter > on domain pause and 'thaw' it on domain unpause, but only thaw it if the > domain is not shutting down. The absolute value of the counter is then > saved in the viridian domain context record. This prevents the guest OS > from experiencing large jumps in the value of the MSR and has been shown > to reliably fix the problem with WMI. > > Signed-off-by: Paul Durrant ARM maintainers: I was about to commit this patch when I noticed that there still was no ack from any of you for this (trivial) addition: > --- a/xen/arch/arm/domain.c > +++ b/xen/arch/arm/domain.c > @@ -580,6 +580,18 @@ void arch_domain_destroy(struct domain *d) > free_xenheap_page(d->shared_info); > } > > +void arch_domain_shutdown(struct domain *d) > +{ > +} > + > +void arch_domain_pause(struct domain *d) > +{ > +} > + > +void arch_domain_unpause(struct domain *d) > +{ > +} > + > static int is_guest_pv32_psr(uint32_t psr) > { > switch (psr & PSR_MODE_MASK) Jan