diff options
author | Keir Fraser <keir@xen.org> | 2010-12-09 08:34:59 +0000 |
---|---|---|
committer | Keir Fraser <keir@xen.org> | 2010-12-09 08:34:59 +0000 |
commit | 73c602edff0024f5f4b27d3e3d0a7fcf724083f3 (patch) | |
tree | 40f8b87464886bbd4372f26159d412e25d73cb7d /xen/arch/x86/hvm/vlapic.c | |
parent | 1a5e650389f7cfeeee554fca63ca3e748a7dadc5 (diff) | |
download | xen-73c602edff0024f5f4b27d3e3d0a7fcf724083f3.tar.gz xen-73c602edff0024f5f4b27d3e3d0a7fcf724083f3.tar.bz2 xen-73c602edff0024f5f4b27d3e3d0a7fcf724083f3.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>
Diffstat (limited to 'xen/arch/x86/hvm/vlapic.c')
-rw-r--r-- | xen/arch/x86/hvm/vlapic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/arch/x86/hvm/vlapic.c b/xen/arch/x86/hvm/vlapic.c index 483588a99b..cf0ee21081 100644 --- a/xen/arch/x86/hvm/vlapic.c +++ b/xen/arch/x86/hvm/vlapic.c @@ -955,12 +955,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, |