diff options
author | Keir Fraser <keir@xensource.com> | 2007-10-31 09:14:49 +0000 |
---|---|---|
committer | Keir Fraser <keir@xensource.com> | 2007-10-31 09:14:49 +0000 |
commit | 4b8661da8ee24c30258d3473f399c39cbfb8b0bb (patch) | |
tree | 6c4e70e3fbd31a1f293bb3c2a5eb436b0e422eb0 /xen/arch/x86/hvm/vpt.c | |
parent | a2db50290a4cf31cf0d2e7626a417b707a8af290 (diff) | |
download | xen-4b8661da8ee24c30258d3473f399c39cbfb8b0bb.tar.gz xen-4b8661da8ee24c30258d3473f399c39cbfb8b0bb.tar.bz2 xen-4b8661da8ee24c30258d3473f399c39cbfb8b0bb.zip |
x86, hvm: Fix 'no_missed_tick_accoutning' timer mode.
From: Haitao Shan <haitao.shan@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/arch/x86/hvm/vpt.c')
-rw-r--r-- | xen/arch/x86/hvm/vpt.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/xen/arch/x86/hvm/vpt.c b/xen/arch/x86/hvm/vpt.c index 605a572283..75f64b26b9 100644 --- a/xen/arch/x86/hvm/vpt.c +++ b/xen/arch/x86/hvm/vpt.c @@ -118,7 +118,14 @@ void pt_restore_timer(struct vcpu *v) list_for_each_entry ( pt, head, list ) { if ( !mode_is(v->domain, no_missed_tick_accounting) ) + { pt_process_missed_ticks(pt); + } + else if ( (NOW() - pt->scheduled) >= 0 ) + { + pt->pending_intr_nr++; + pt->scheduled = NOW() + pt->period; + } set_timer(&pt->timer, pt->scheduled); } @@ -139,14 +146,7 @@ static void pt_timer_fn(void *data) { pt->scheduled += pt->period; if ( !mode_is(pt->vcpu->domain, no_missed_tick_accounting) ) - { pt_process_missed_ticks(pt); - } - else if ( (NOW() - pt->scheduled) >= 0 ) - { - pt->pending_intr_nr++; - pt->scheduled = NOW() + pt->period; - } set_timer(&pt->timer, pt->scheduled); } |