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] hvm: Fix one-shot timers. Do not disable

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] hvm: Fix one-shot timers. Do not disable until the interrupt has been
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 17 Oct 2007 09:40:20 -0700
Delivery-date: Wed, 17 Oct 2007 10:27:10 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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@xxxxxxxxxxxxx>
# Date 1192623123 -3600
# Node ID b4278beaf3549f410a5a6086dbd8af93c495aeac
# Parent  d994e6d3136de94f50aeb86c4a060ee06ecfbf6d
hvm: Fix one-shot timers. Do not disable until the interrupt has been
latched by the target VCPU.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/hvm/vpt.c |   23 ++++++++++++-----------
 1 files changed, 12 insertions(+), 11 deletions(-)

diff -r d994e6d3136d -r b4278beaf354 xen/arch/x86/hvm/vpt.c
--- a/xen/arch/x86/hvm/vpt.c    Wed Oct 17 11:17:53 2007 +0100
+++ b/xen/arch/x86/hvm/vpt.c    Wed Oct 17 13:12:03 2007 +0100
@@ -46,7 +46,7 @@ static void missed_ticks(struct periodic
 {
     s_time_t missed_ticks;
 
-    if ( unlikely(pt->one_shot) )
+    if ( pt->one_shot )
         return;
 
     missed_ticks = NOW() - pt->scheduled;
@@ -115,12 +115,7 @@ static void pt_timer_fn(void *data)
 
     pt->pending_intr_nr++;
 
-    if ( unlikely(pt->one_shot) )
-    {
-        pt->enabled = 0;
-        list_del(&pt->list);
-    }
-    else
+    if ( !pt->one_shot )
     {
         pt->scheduled += pt->period;
         missed_ticks(pt);
@@ -212,10 +207,16 @@ void pt_intr_post(struct vcpu *v, struct
         return;
     }
 
-    ASSERT(pt->vcpu == v);
-
-    pt->pending_intr_nr--;
-    pt->last_plt_gtime += pt->period_cycles;
+    if ( pt->one_shot )
+    {
+        pt->enabled = 0;
+        list_del(&pt->list);
+    }
+    else
+    {
+        pt->pending_intr_nr--;
+        pt->last_plt_gtime += pt->period_cycles;
+    }
 
     if ( hvm_get_guest_time(v) < pt->last_plt_gtime )
         hvm_set_guest_time(v, 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] hvm: Fix one-shot timers. Do not disable until the interrupt has been, Xen patchbot-unstable <=