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

[Xen-changelog] [xen-4.0-testing] x86:vlapic: Fix possible guest tick losing after save/restore



# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1291889763 0
# Node ID 2548598d110d38355917b20abaa3422e32636001
# Parent  6197158f6ba6acea6389ee260bfe8e96a42dfd6e
x86:vlapic: Fix possible guest tick losing after save/restore

Guest vcpu may totally lose all ticks if the vlapic->pt.irq was not
restored during save/restore process. Fix it.

Signed-off-by: Wei Gang <gang.wei@xxxxxxxxx>
xen-unstable changeset:   22470:0c97247c64d6
xen-unstable date:        Thu Dec 09 08:34:59 2010 +0000
---
 xen/arch/x86/hvm/vlapic.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r 6197158f6ba6 -r 2548598d110d xen/arch/x86/hvm/vlapic.c
--- a/xen/arch/x86/hvm/vlapic.c Thu Dec 09 10:14:57 2010 +0000
+++ b/xen/arch/x86/hvm/vlapic.c Thu Dec 09 10:16:03 2010 +0000
@@ -863,12 +863,12 @@ static void lapic_rearm(struct vlapic *s
     unsigned long tmict = vlapic_get_reg(s, APIC_TMICT);
     uint64_t period;
 
+    s->pt.irq = vlapic_get_reg(s, APIC_LVTT) & APIC_VECTOR_MASK;
     if ( (tmict = vlapic_get_reg(s, APIC_TMICT)) == 0 )
         return;
 
     period = ((uint64_t)APIC_BUS_CYCLE_NS *
               (uint32_t)tmict * s->hw.timer_divisor);
-    s->pt.irq = vlapic_get_reg(s, APIC_LVTT) & APIC_VECTOR_MASK;
     create_periodic_time(vlapic_vcpu(s), &s->pt, period,
                          vlapic_lvtt_period(s) ? period : 0,
                          s->pt.irq, vlapic_pt_cb,

_______________________________________________
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®.