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-changelog

[Xen-changelog] [xen-unstable] x86 hvm: Fix VLAPIC TMCCT register when t

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86 hvm: Fix VLAPIC TMCCT register when timer is one-shot
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 08 Dec 2010 04:45:14 -0800
Delivery-date: Wed, 08 Dec 2010 04:45:25 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1291745446 0
# Node ID f5d6afa46dd796d46dee028a28c97d29491e288c
# Parent  de851b79600c1e782201873eb1387d922ab872eb
x86 hvm: Fix VLAPIC TMCCT register when timer is one-shot

Signed-off-by: Keir Fraser <keir@xxxxxxx>
---
 xen/arch/x86/hvm/vlapic.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff -r de851b79600c -r f5d6afa46dd7 xen/arch/x86/hvm/vlapic.c
--- a/xen/arch/x86/hvm/vlapic.c Fri Dec 03 06:37:48 2010 +0000
+++ b/xen/arch/x86/hvm/vlapic.c Tue Dec 07 18:10:46 2010 +0000
@@ -430,7 +430,7 @@ static uint32_t vlapic_get_tmcct(struct 
 
     counter_passed = ((hvm_get_guest_time(v) - vlapic->timer_last_update)
                       / APIC_BUS_CYCLE_NS / vlapic->hw.timer_divisor);
-    tmcct = tmict - counter_passed;
+    tmcct = (counter_passed < tmict) ? tmict - counter_passed : 0;
 
     HVM_DBG_LOG(DBG_LEVEL_VLAPIC_TIMER,
                 "timer initial count %d, timer current count %d, "
@@ -677,7 +677,8 @@ static int vlapic_write(struct vcpu *v, 
                   (uint32_t)val * vlapic->hw.timer_divisor);
         create_periodic_time(current, &vlapic->pt, period, 
                              vlapic_lvtt_period(vlapic) ? period : 0,
-                             vlapic->pt.irq, vlapic_pt_cb,
+                             vlapic->pt.irq,
+                             vlapic_lvtt_period(vlapic) ? vlapic_pt_cb : NULL,
                              &vlapic->timer_last_update);
         vlapic->timer_last_update = vlapic->pt.last_plt_gtime;
 
@@ -874,7 +875,8 @@ static void lapic_rearm(struct vlapic *s
     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,
+                         s->pt.irq,
+                         vlapic_lvtt_period(s) ? vlapic_pt_cb : NULL,
                          &s->timer_last_update);
     s->timer_last_update = s->pt.last_plt_gtime;
 }

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86 hvm: Fix VLAPIC TMCCT register when timer is one-shot, Xen patchbot-unstable <=