From: Rik van Riel <riel@redhat.com> Date: Mon, 13 Apr 2009 12:08:41 -0400 Subject: [xen] x86: fixes to the 'no missed-tick accounting' code Message-id: 20090413120841.4ed9542e@bree.surriel.com O-Subject: [RHEL 5.4 PATCH 4/5] fixes to the "no missed-tick accounting" code (bz 449346) Bugzilla: 449346 RH-Acked-by: Justin M. Forbes <jforbes@redhat.com> RH-Acked-by: Chris Lalancette <clalance@redhat.com> RH-Acked-by: Don Dutile <ddutile@redhat.com> Some bugfixes to the "no missed-tick accounting" code. Fixes bug 449346 # HG changeset patch # User Keir Fraser <keir.fraser@citrix.com> # Date 1199802683 0 # Node ID 01adaec882d4ea62aede17926716d122b084dd94 # Parent 66db23ecd5628d87890abe0744ae3dc20b62bced hvm: time: Fixes to 'SYNC' (no_missed_ticks_pending) timer handling. Based on a patch by Dave Winchell <dwinchell@virtualiron.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com> diff --git a/arch/x86/hvm/vpt.c b/arch/x86/hvm/vpt.c index b2c3839..586f7a3 100644 --- a/arch/x86/hvm/vpt.c +++ b/arch/x86/hvm/vpt.c @@ -166,6 +166,7 @@ static void pt_timer_fn(void *data) pt_lock(pt); pt->pending_intr_nr++; + pt->do_not_freeze = 0; if ( !pt->one_shot ) { @@ -251,7 +252,6 @@ void pt_intr_post(struct vcpu *v, int vector, int type) return; } - pt->do_not_freeze = 0; pt->irq_issued = 0; if ( pt->one_shot ) @@ -262,7 +262,8 @@ void pt_intr_post(struct vcpu *v, int vector, int type) } else { - if ( mode_is(v->domain, one_missed_tick_pending) ) + if ( mode_is(v->domain, one_missed_tick_pending) || + mode_is(v->domain, no_missed_ticks_pending) ) { pt->last_plt_gtime = hvm_get_guest_time(v); pt->pending_intr_nr = 0; /* 'collapse' all missed ticks */