From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DQGQ2-0007CA-Us for qemu-devel@nongnu.org; Mon, 25 Apr 2005 23:07:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DQGQ0-0007Ao-RQ for qemu-devel@nongnu.org; Mon, 25 Apr 2005 23:07:26 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DQGQ0-0006pw-Jk for qemu-devel@nongnu.org; Mon, 25 Apr 2005 23:07:24 -0400 Received: from [206.124.138.239] (helo=pdx.silverbeach.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DQGPH-0005Zg-I6 for qemu-devel@nongnu.org; Mon, 25 Apr 2005 23:06:40 -0400 Received: from [10.206.1.17] (tlingit.sea.silverbeach.net [10.206.1.17]) by pdx.silverbeach.net (Postfix) with ESMTP id CC2311BF367 for ; Mon, 25 Apr 2005 20:03:03 -0700 (PDT) From: Kyle Hayes Subject: Re: [Qemu-devel] [patch] option -no-tsc for i386 with speedstep Date: Mon, 25 Apr 2005 20:03:01 -0700 References: <20050425111532.GA2554@dizzy.ath.cx> In-Reply-To: <20050425111532.GA2554@dizzy.ath.cx> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200504252003.01917.kyle@silverbeach.net> Reply-To: kyle@silverbeach.net, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Monday 25 April 2005 04:15, Massimo Dal Zotto wrote: > When qemu runs on an i386 cpu with speedstep enabled the clock of the > guest os is not in sync with the clock on the host os because the > vm_timer used for irq 0 generates interrupts at wrong rate when > the host cpu frequency changes. > > The problem is that the vm_timer uses the rdtsc instruction and the > value of ticks_per_sec, computed at start time, for calculating the > expire time of vm_timers. While ticks_per_sec is constant the values > returned by rdtsc are dependent on the current cpu clock, which is not > constant if speedstep is used. There is a discussion about this problem on either x86-secret.com or Sudhian. I can't remember which :-( In the latest series of P4 chips (both Xeon and desktop I think), the counter used for the rdtsc instruction stays at the same frequency while the rest of the CPU changes. This led to some "interesting" results with programs like CPU-Z. Intel's response was that they now hold the counter at a stable frequency so that this works. Unfortunately, there are years of processors which do not do that, so other workarounds must be done. Best, Kyle