From: Kouya Shimura Subject: [PATCH] x86 hvm: fix missing ticks bug of c/s 20218 Date: Fri, 18 Sep 2009 14:24:50 +0900 Message-ID: <7k8wgcdduj.fsf@pingu.sky.yk.fujitsu.co.jp> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="ZiQrOeJbcV" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Christoph Egger , Keir Fraser List-Id: xen-devel@lists.xenproject.org --ZiQrOeJbcV Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit 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 Reported-by: Christoph Egger --ZiQrOeJbcV Content-Type: text/x-patch Content-Disposition: inline; filename="fix_cs20218.patch" Content-Transfer-Encoding: 7bit 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) && --ZiQrOeJbcV Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --ZiQrOeJbcV--