[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-3.1-testing] hvm: Initialize vlapic->timer_last_update.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1196962487 0
# Node ID 42ce3cbd17ccc4fc0e81ea58af737c73ad1c008b
# Parent  3b423ab38b7ae6e27fdf3407ecf903b07f863575
hvm: Initialize vlapic->timer_last_update.

Without the fix, before the first vlapic timer interrupt is injected,
the "vlapic->timer_last_update" in vlapic_get_tmcct()  is always 0,
causing a wrong value of counter_passed.

Signed-off-by: Dexuan Cui <dexuan.cui@xxxxxxxxx>
xen-unstable changeset:   16536:89e7031e153c62b9ce223a58a7ba49df285784a7
xen-unstable date:        Wed Dec 05 14:01:39 2007 +0000
---
 xen/arch/x86/hvm/vlapic.c |    2 ++
 1 files changed, 2 insertions(+)

diff -r 3b423ab38b7a -r 42ce3cbd17cc xen/arch/x86/hvm/vlapic.c
--- a/xen/arch/x86/hvm/vlapic.c Thu Dec 06 17:31:45 2007 +0000
+++ b/xen/arch/x86/hvm/vlapic.c Thu Dec 06 17:34:47 2007 +0000
@@ -660,6 +660,7 @@ static void vlapic_write(struct vcpu *v,
         vlapic_set_reg(vlapic, APIC_TMICT, val);
         create_periodic_time(current, &vlapic->pt, period, vlapic->pt.irq,
                              !vlapic_lvtt_period(vlapic), NULL, vlapic);
+        vlapic->timer_last_update = vlapic->pt.last_plt_gtime;
 
         HVM_DBG_LOG(DBG_LEVEL_VLAPIC,
                     "bus cycle is %uns, "
@@ -821,6 +822,7 @@ static void lapic_rearm(struct vlapic *s
         s->pt.irq = lvtt & APIC_VECTOR_MASK;
         create_periodic_time(vlapic_vcpu(s), &s->pt, period, s->pt.irq,
                              !vlapic_lvtt_period(s), NULL, s);
+        s->timer_last_update = s->pt.last_plt_gtime;
 
         printk("lapic_load to rearm the actimer:"
                "bus cycle is %uns, "

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.