[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] hvm: Fix one-shot timers. Do not disable until the interrupt has been
# HG changeset patch # User Keir Fraser <keir@xxxxxxxxxxxxx> # Date 1192623123 -3600 # Node ID b4278beaf3549f410a5a6086dbd8af93c495aeac # Parent d994e6d3136de94f50aeb86c4a060ee06ecfbf6d hvm: Fix one-shot timers. Do not disable until the interrupt has been latched by the target VCPU. Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> --- xen/arch/x86/hvm/vpt.c | 23 ++++++++++++----------- 1 files changed, 12 insertions(+), 11 deletions(-) diff -r d994e6d3136d -r b4278beaf354 xen/arch/x86/hvm/vpt.c --- a/xen/arch/x86/hvm/vpt.c Wed Oct 17 11:17:53 2007 +0100 +++ b/xen/arch/x86/hvm/vpt.c Wed Oct 17 13:12:03 2007 +0100 @@ -46,7 +46,7 @@ static void missed_ticks(struct periodic { s_time_t missed_ticks; - if ( unlikely(pt->one_shot) ) + if ( pt->one_shot ) return; missed_ticks = NOW() - pt->scheduled; @@ -115,12 +115,7 @@ static void pt_timer_fn(void *data) pt->pending_intr_nr++; - if ( unlikely(pt->one_shot) ) - { - pt->enabled = 0; - list_del(&pt->list); - } - else + if ( !pt->one_shot ) { pt->scheduled += pt->period; missed_ticks(pt); @@ -212,10 +207,16 @@ void pt_intr_post(struct vcpu *v, struct return; } - ASSERT(pt->vcpu == v); - - pt->pending_intr_nr--; - pt->last_plt_gtime += pt->period_cycles; + if ( pt->one_shot ) + { + pt->enabled = 0; + list_del(&pt->list); + } + else + { + pt->pending_intr_nr--; + pt->last_plt_gtime += pt->period_cycles; + } if ( hvm_get_guest_time(v) < pt->last_plt_gtime ) hvm_set_guest_time(v, pt->last_plt_gtime); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |