# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 766817372cab8b42b542bf05386f0850b4ea61e1
# Parent 53b0dc1cb1db1ca55723d241758bceb4b0577801
Fix call to set_timer in vlapic.c. Should not set timer.expires
outside set_timer, since set_timer will do that for the caller.
Signed-off-by: Xin Li <xin.b.li@xxxxxxxxx>
diff -r 53b0dc1cb1db -r 766817372cab xen/arch/x86/hvm/vlapic.c
--- a/xen/arch/x86/hvm/vlapic.c Wed Mar 8 14:39:59 2006
+++ b/xen/arch/x86/hvm/vlapic.c Wed Mar 8 14:49:04 2006
@@ -239,9 +239,7 @@
case VLAPIC_DELIV_MODE_INIT:
if ( !level && trig_mode == 1 ) //Deassert
- {
printk("This hvm_vlapic is for P4, no work for De-assert init\n");
- }
else
{
/* FIXME How to check the situation after vcpu reset? */
@@ -529,7 +527,6 @@
counter_passed = passed /
(APIC_BUS_CYCLE_NS * vlapic->timer_divide_count);
-
vlapic->timer_current_count -= counter_passed;
if ( vlapic->timer_current_count <= 0 )
{
@@ -769,16 +766,15 @@
offset = APIC_BUS_CYCLE_NS *
vlapic->timer_divide_count *
vlapic->timer_initial_count;
- vlapic->vlapic_timer.expires = now + offset;
-
- set_timer(&vlapic->vlapic_timer, vlapic->vlapic_timer.expires);
+
+ set_timer(&vlapic->vlapic_timer, now + offset);
HVM_DBG_LOG(DBG_LEVEL_VLAPIC,
"bus cycle is %"PRId64"ns, now 0x%016"PRIx64", "
"timer initial count 0x%x, offset 0x%016"PRIx64", "
"expire @ 0x%016"PRIx64".",
APIC_BUS_CYCLE_NS, now, vlapic->timer_initial_count,
- offset, vlapic->vlapic_timer.expires);
+ offset, now + offset);
}
break;
@@ -873,8 +869,7 @@
offset = APIC_BUS_CYCLE_NS *
vlapic->timer_divide_count *
vlapic->timer_initial_count;
- vlapic->vlapic_timer.expires = now + offset;
- set_timer(&vlapic->vlapic_timer, vlapic->vlapic_timer.expires);
+ set_timer(&vlapic->vlapic_timer, now + offset);
}
else
vlapic->timer_current_count = 0;
@@ -890,7 +885,8 @@
"now 0x%016"PRIx64", expire @ 0x%016"PRIx64", "
"timer initial count 0x%x, timer current count 0x%x.",
now, vlapic->vlapic_timer.expires,
- vlapic->timer_initial_count, vlapic->timer_current_count);
+ vlapic->timer_initial_count,
+ vlapic->timer_current_count);
}
#if 0
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|