WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] fix time reporting to guest
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Mon, 26 Mar 2007 15:28:10 +0100
Delivery-date: Mon, 26 Mar 2007 07:26:37 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] fix time reporting to guest, Jan Beulich <=