WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH]x86:vlapic: Fix possible guest tick losing after save

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH]x86:vlapic: Fix possible guest tick losing after save/restore
From: "Wei, Gang" <gang.wei@xxxxxxxxx>
Date: Thu, 9 Dec 2010 11:07:25 +0800
Accept-language: zh-CN, en-US
Acceptlanguage: zh-CN, en-US
Cc: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, "Wei, Gang" <gang.wei@xxxxxxxxx>
Delivery-date: Wed, 08 Dec 2010 19:09:52 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcuXTjSY91dqx8AkQseWcypWwD31ew==
Thread-topic: [PATCH]x86:vlapic: Fix possible guest tick losing after save/restore
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>

diff -r 0892f5a96736 xen/arch/x86/hvm/vlapic.c
--- a/xen/arch/x86/hvm/vlapic.c Fri Dec 10 15:19:51 2010 +0800
+++ b/xen/arch/x86/hvm/vlapic.c Fri Dec 10 15:27:11 2010 +0800
@@ -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,

Attachment: vlapic-fix.patch
Description: vlapic-fix.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH]x86:vlapic: Fix possible guest tick losing after save/restore, Wei, Gang <=