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] fix check_tsc_warp bug

To: "Xen-Devel (E-mail)" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] fix check_tsc_warp bug
From: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Date: Wed, 7 Oct 2009 13:44:39 -0700 (PDT)
Cc: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Wed, 07 Oct 2009 13:46:34 -0700
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
I wasn't able to easily test the check_tsc_warp patch on
a machine which did have skew, so I synthesized skew
and discovered this bug.

Signed-off-by: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>

diff -r f9cbb5a274d6 xen/arch/x86/time.c
--- a/xen/arch/x86/time.c       Wed Oct 07 10:26:39 2009 +0100
+++ b/xen/arch/x86/time.c       Wed Oct 07 14:40:02 2009 -0600
@@ -1494,7 +1494,7 @@ void check_tsc_warp(unsigned long tsc_kh
         if ( unlikely(prev > now) )
         {
             spin_lock(&sync_lock);
-            if ( *max_warp > prev - now )
+            if ( *max_warp < prev - now )
                 *max_warp = prev - now;
             spin_unlock(&sync_lock);
         }

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] fix check_tsc_warp bug, Dan Magenheimer <=