Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 May 2011 01:08:53 +0000 (UTC)
From:      Peter Grehan <grehan@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r222238 - projects/bhyve/usr.sbin/bhyve
Message-ID:  <201105240108.p4O18rro045418@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: grehan
Date: Tue May 24 01:08:53 2011
New Revision: 222238
URL: http://svn.freebsd.org/changeset/base/222238

Log:
  Catch up with CURRENTs different timer usage compared to 8.1. A counter
  value of 0 in rategen mode is equivalent to a max initial value.
  The TSC is now correctly calibrated on a 9.0 guest.
  
  Obtained from:	NetApp

Modified:
  projects/bhyve/usr.sbin/bhyve/pit_8254.c

Modified: projects/bhyve/usr.sbin/bhyve/pit_8254.c
==============================================================================
--- projects/bhyve/usr.sbin/bhyve/pit_8254.c	Mon May 23 23:58:02 2011	(r222237)
+++ projects/bhyve/usr.sbin/bhyve/pit_8254.c	Tue May 24 01:08:53 2011	(r222238)
@@ -183,6 +183,8 @@ pit_8254_handler(struct vmctx *ctx, int 
 		if (c->crbyte == 2) {
 			c->crbyte = 0;
 			c->initial = c->cr[0] | (uint16_t)c->cr[1] << 8;
+			if (c->initial == 0)
+				c->initial = 0xffff;
 			gettimeofday(&c->tv, NULL);
 		}
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105240108.p4O18rro045418>