]> xenbits.xensource.com Git - xen.git/commit
x86/viridian: freeze time reference counter when domain is paused
authorPaul Durrant <paul.durrant@citrix.com>
Tue, 21 Oct 2014 15:31:31 +0000 (17:31 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 21 Oct 2014 15:31:31 +0000 (17:31 +0200)
commitf6a07643e1cc0045c2a8eabb0fb106e8655ce25d
treeae4e2d82a8ed397438fe88582d9df9a32a4d44f6
parent91086d09f742ffceb499862562bbf50cd9e6aaeb
x86/viridian: freeze time reference counter when domain is paused

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 <paul.durrant@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/domain.c
xen/arch/x86/domain.c
xen/arch/x86/hvm/viridian.c
xen/common/domain.c
xen/include/asm-x86/hvm/hvm.h
xen/include/asm-x86/hvm/viridian.h
xen/include/public/arch-x86/hvm/save.h
xen/include/xen/domain.h