[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] xen: fix initialization of wallclock time for PVHVM on migration



The initial values of the wallclock time in the shared info page are
set for PVHVM guests when the hypercall page is initialized, since the
hypercall page is not reinitialized on resume, the hypervisor
wallclock time is not properly set on resume.

Fix it by forcing an update of the wallclock values when the shared
info page is mapped.

Signed-off-by: Roger Pau Monnà <roger.pau@xxxxxxxxxx>
Cc: Jan Beulich <JBeulich@xxxxxxxx>
Cc: Keir Fraser <keir@xxxxxxx>
Cc: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
---
Since this is a bug fix, I think it is suitable for inclusion in the
4.3 release, and backported to older releases.
---
 xen/arch/x86/mm.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index 5123860..1591528 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -4629,6 +4629,14 @@ static int xenmem_add_to_physmap_once(
         put_gfn(d, gfn);
     domain_unlock(d);
 
+    if ( !rc && xatp->space == XENMAPSPACE_shared_info )
+        /*
+         * Force an update of the wallclock values in the shared info
+         * page, since in the PVHVM resume path the hypercall page is
+         * not reinitialized.
+         */
+        update_domain_wallclock_time(d);
+
     return rc;
 }
 
-- 
1.7.7.5 (Apple Git-26)


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.