From: Ian Campbell Subject: #599161: Xen debug patch for the "clock shifts by 50 minutes" bug. Date: Fri, 26 Oct 2012 13:59:52 +0100 Message-ID: <1351256392.15162.76.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-E0x8ea9EY6y+T/d7gUWv" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: 599161@bugs.debian.org List-Id: xen-devel@lists.xenproject.org --=-E0x8ea9EY6y+T/d7gUWv Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Hi all, I've BCC'd a number of people who have reported seeing this bug at various times in the past. If you can still repro I'd appreciate it if you could give the patch in http://marc.info/?l=xen-devel&m=135049062216685&w=2 (also attached) a go and report back success/failure and the output of the debugging messages produced. Thanks, Ian. -- Ian Campbell Current Noise: Death - Evil Dead Executive ability is prominent in your make-up. --=-E0x8ea9EY6y+T/d7gUWv Content-Disposition: attachment; filename="00-tsc-debug" Content-Type: text/x-patch; name="00-tsc-debug"; charset="UTF-8" Content-Transfer-Encoding: 7bit diff -r c1c549c4fe9e xen/arch/x86/time.c --- a/xen/arch/x86/time.c Mon Oct 15 16:51:44 2012 +0100 +++ b/xen/arch/x86/time.c Wed Oct 17 17:13:22 2012 +0100 @@ -523,11 +523,12 @@ static s_time_t __read_platform_stime(u6 static void plt_overflow(void *unused) { int i; - u64 count; + u64 count, old_stamp, tsc; s_time_t now, plt_now, plt_wrap; spin_lock_irq(&platform_timer_lock); + old_stamp = plt_stamp; count = plt_src.read_counter(); plt_stamp64 += (count - plt_stamp) & plt_mask; plt_stamp = count; @@ -540,6 +541,14 @@ static void plt_overflow(void *unused) plt_wrap = __read_platform_stime(plt_stamp64 + plt_mask + 1); if ( ABS(plt_wrap - now) > ABS(plt_now - now) ) break; + rdtscll(tsc); + printk("XXX plt_overflow: plt_now=%"PRIx64" plt_wrap=%"PRIx64 + " now=%"PRIx64" old_stamp=%"PRIx64" new_stamp=%"PRIx64 + " plt_stamp64=%"PRIx64" plt_mask=%"PRIx64 + " tsc=%"PRIx64" tsc_stamp=%"PRIx64"\n", + plt_now, plt_wrap, now, old_stamp, plt_stamp, plt_stamp64, + plt_mask, tsc, this_cpu(cpu_time).local_tsc_stamp); + break; plt_stamp64 += plt_mask + 1; } if ( i != 0 ) --=-E0x8ea9EY6y+T/d7gUWv Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --=-E0x8ea9EY6y+T/d7gUWv--