aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir@xen.org>2010-12-09 10:16:03 +0000
committerKeir Fraser <keir@xen.org>2010-12-09 10:16:03 +0000
commit13ef6dbde14288c475df7203a30dbbd21e4066aa (patch)
tree5dec8dfeaffdb534b1ccc83b3b416e7ac597da1f
parent4dbf5ef7073b051ab7374f597914cd9678e087da (diff)
downloadxen-13ef6dbde14288c475df7203a30dbbd21e4066aa.tar.gz
xen-13ef6dbde14288c475df7203a30dbbd21e4066aa.tar.bz2
xen-13ef6dbde14288c475df7203a30dbbd21e4066aa.zip
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@intel.com> xen-unstable changeset: 22470:0c97247c64d6 xen-unstable date: Thu Dec 09 08:34:59 2010 +0000
-rw-r--r--xen/arch/x86/hvm/vlapic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/arch/x86/hvm/vlapic.c b/xen/arch/x86/hvm/vlapic.c
index 83057f91f5..0b09aa9567 100644
--- a/xen/arch/x86/hvm/vlapic.c
+++ b/xen/arch/x86/hvm/vlapic.c
@@ -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,