diff -r cfdbdca5b831 xen/arch/x86/hvm/vpt.c --- a/xen/arch/x86/hvm/vpt.c Thu Dec 06 15:36:07 2007 +0000 +++ b/xen/arch/x86/hvm/vpt.c Fri Jan 04 17:58:16 2008 -0500 @@ -58,7 +58,7 @@ static void pt_process_missed_ticks(stru missed_ticks = missed_ticks / (s_time_t) pt->period + 1; if ( mode_is(pt->vcpu->domain, no_missed_ticks_pending) ) - pt->do_not_freeze = !pt->pending_intr_nr; + pt->do_not_freeze = 1; else pt->pending_intr_nr += missed_ticks; pt->scheduled += missed_ticks * pt->period; @@ -127,7 +127,12 @@ static void pt_timer_fn(void *data) pt_lock(pt); - pt->pending_intr_nr++; + if ( mode_is(pt->vcpu->domain, no_missed_ticks_pending) ) { + pt->pending_intr_nr = 1; + pt->do_not_freeze = 0; + } + else + pt->pending_intr_nr++; if ( !pt->one_shot ) { @@ -221,8 +226,6 @@ void pt_intr_post(struct vcpu *v, struct return; } - pt->do_not_freeze = 0; - if ( pt->one_shot ) { pt->enabled = 0; @@ -235,6 +238,10 @@ void pt_intr_post(struct vcpu *v, struct pt->last_plt_gtime = hvm_get_guest_time(v); pt->pending_intr_nr = 0; /* 'collapse' all missed ticks */ } + else if ( mode_is(v->domain, no_missed_ticks_pending) ) { + pt->pending_intr_nr--; + pt->last_plt_gtime = hvm_get_guest_time(v); + } else { pt->last_plt_gtime += pt->period_cycles;