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] x86 hvm: fix missing ticks bug of c/s 20218

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] x86 hvm: fix missing ticks bug of c/s 20218
From: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
Date: Fri, 18 Sep 2009 14:24:50 +0900
Cc: Christoph Egger <Christoph.Egger@xxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Thu, 17 Sep 2009 22:24:59 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
With c/s 20218, timer ticks might be missed when IRQs of a timer are queued. 
Next scheduled time is accumulated wrongly.

Thanks to Christoph for the report.

Thanks,
Kouya

Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
Reported-by: Christoph Egger <Christoph.Egger@xxxxxxx>

diff -r 72d130772f36 xen/arch/x86/hvm/vpt.c
--- a/xen/arch/x86/hvm/vpt.c    Wed Sep 16 09:30:41 2009 +0100
+++ b/xen/arch/x86/hvm/vpt.c    Fri Sep 18 13:54:12 2009 +0900
@@ -308,9 +308,6 @@ void pt_intr_post(struct vcpu *v, struct
     }
     else
     {
-        pt->scheduled += pt->period;
-        pt_process_missed_ticks(pt);
-
         if ( mode_is(v->domain, one_missed_tick_pending) ||
              mode_is(v->domain, no_missed_ticks_pending) )
         {
@@ -324,7 +321,12 @@ void pt_intr_post(struct vcpu *v, struct
         }
 
         if ( pt->pending_intr_nr == 0 )
+        {
+            pt->scheduled += pt->period;
+            pt_process_missed_ticks(pt);
+            pt->do_not_freeze = 0;
             set_timer(&pt->timer, pt->scheduled);
+        }
     }
 
     if ( mode_is(v->domain, delay_for_missed_ticks) &&
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>