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

[Xen-devel] [PATCH] fix time reporting to guest



The recent change to guest time handling dropped a call to
update_vcpu_system_time(), leading to time-went-backwards messages and
guest hangs (the latter were observed only in 2.6.21-rc4 and only when
no serial console was in use). Re-adding that missing call, and at once
also adding one before raising a single shot timer event.

Debugging the issue also revealed that some commented out debug printk-s
in x86's time handling code didn't compile under x86-64.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

Index: 2007-03-19/xen/arch/x86/time.c
===================================================================
--- 2007-03-19.orig/xen/arch/x86/time.c 2007-02-23 09:42:38.000000000 +0100
+++ 2007-03-19/xen/arch/x86/time.c      2007-03-26 13:45:53.000000000 +0200
@@ -771,9 +771,9 @@ static void local_time_calibration(void 
     local_irq_enable();
 
 #if 0
-    printk("PRE%d: tsc=%lld stime=%lld master=%lld\n",
+    printk("PRE%d: tsc=%"PRIu64" stime=%"PRIu64" master=%"PRIu64"\n",
            smp_processor_id(), prev_tsc, prev_local_stime, prev_master_stime);
-    printk("CUR%d: tsc=%lld stime=%lld master=%lld -> %lld\n",
+    printk("CUR%d: tsc=%"PRIu64" stime=%"PRIu64" master=%"PRIu64" -> 
%"PRId64"\n",
            smp_processor_id(), curr_tsc, curr_local_stime, curr_master_stime,
            curr_master_stime - curr_local_stime);
 #endif
Index: 2007-03-19/xen/common/schedule.c
===================================================================
--- 2007-03-19.orig/xen/common/schedule.c       2007-03-12 10:23:32.000000000 
+0100
+++ 2007-03-19/xen/common/schedule.c    2007-03-26 13:38:02.000000000 +0200
@@ -691,6 +691,7 @@ static void s_timer_fn(void *unused)
 static void vcpu_periodic_timer_fn(void *data)
 {
     struct vcpu *v = data;
+    update_vcpu_system_time(v);
     vcpu_periodic_timer_work(v);
 }
 
@@ -698,6 +699,7 @@ static void vcpu_periodic_timer_fn(void 
 static void vcpu_singleshot_timer_fn(void *data)
 {
     struct vcpu *v = data;
+    update_vcpu_system_time(v);
     send_timer_event(v);
 }
 



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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