From: Dan Magenheimer Subject: [PATCH] fix check_tsc_warp bug Date: Wed, 7 Oct 2009 13:44:39 -0700 (PDT) Message-ID: <7766e627-6219-4fc3-84c7-c544249dc2c8@default> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Xen-Devel (E-mail)" Cc: Keir Fraser List-Id: xen-devel@lists.xenproject.org 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 diff -r f9cbb5a274d6 xen/arch/x86/time.c --- a/xen/arch/x86/time.c=09Wed Oct 07 10:26:39 2009 +0100 +++ b/xen/arch/x86/time.c=09Wed 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 =3D prev - now; spin_unlock(&sync_lock); }