From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fv9Fh-0003th-H9 for qemu-devel@nongnu.org; Tue, 27 Jun 2006 04:48:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fv9Fg-0003tO-2m for Qemu-devel@nongnu.org; Tue, 27 Jun 2006 04:48:57 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fv9Ff-0003tH-R6 for Qemu-devel@nongnu.org; Tue, 27 Jun 2006 04:48:55 -0400 Received: from [195.54.107.70] (helo=mxfep01.bredband.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fv9Rj-0001Xf-GP for Qemu-devel@nongnu.org; Tue, 27 Jun 2006 05:01:23 -0400 Received: from mindkiller.com ([85.225.68.133] [85.225.68.133]) by mxfep01.bredband.com with ESMTP id <20060627084851.PLZE440.mxfep01.bredband.com@mindkiller.com> for ; Tue, 27 Jun 2006 10:48:51 +0200 Received: from WorldClient by mindkiller.com (MDaemon PRO v9.0.1) with ESMTP id md50000113338.msg for ; Tue, 27 Jun 2006 10:45:17 +0200 Date: Tue, 27 Jun 2006 10:45:16 +0200 From: "Robert Falk" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: Subject: [Qemu-devel] PIT clock count Reply-To: 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 Hi, we are developing an x86 application that we are testing using qemu and are having some issues with the PIT clock count. We are using PIT clock count as a reference to measure cpu frequency: wait_wrap() a=read_current_cycles() wait_wrap() b=read_current_cycles() calculate_freq(a,b)... The problem is that when running in qemu it sometimes "loops twice" in the wrap wait, thus reporting twice the cycles. The same problem occurs whether I am running 100Hz or 1000Hz. Is this a known bug? And is there any solution? I recall I have seen similar problems with VMWare and Linux.