From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LK3yj-0002tp-R0 for qemu-devel@nongnu.org; Mon, 05 Jan 2009 23:55:45 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LK3yd-0002tQ-LU for qemu-devel@nongnu.org; Mon, 05 Jan 2009 23:55:44 -0500 Received: from [199.232.76.173] (port=48893 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LK3yd-0002tN-Gm for qemu-devel@nongnu.org; Mon, 05 Jan 2009 23:55:39 -0500 Received: from yw-out-1718.google.com ([74.125.46.152]:60152) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LK3yd-0006PJ-0L for qemu-devel@nongnu.org; Mon, 05 Jan 2009 23:55:39 -0500 Received: by yw-out-1718.google.com with SMTP id 6so2865163ywa.82 for ; Mon, 05 Jan 2009 20:55:36 -0800 (PST) Message-ID: <4962E490.8010804@codemonkey.ws> Date: Mon, 05 Jan 2009 22:56:48 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 1/2] [RFC] Make vmport report the processor speed References: <24689573005-BeMail@laptop> In-Reply-To: <24689573005-BeMail@laptop> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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 François Revol wrote: >> If VMware ESX finds itself virtualized (read: inside VMware), >> it reads the TSC speed >> from its backdoor, because measuring the TSC inside a VM is not >> exact. >> >> This patch implements a hacky way to detect the TSC speed and passes >> that through to >> the VM. I am open to suggestions on how to improve the behavior. >> It also adds a magic return value of 2 on the version return, >> which is required by >> VMware ESX >> > > Oh this is interesting, I might add some stuff to Haiku to use it.. > BeOS (and Haiku) use RDTSC for timing, it's much more precise, but it's > why it runs so strange in VMs... (and will have to be handled when > implementing speedstep) > You should look at KVM_CLOCK in Linux. We could easily implement it for QEMU. It provides a saner way to use the TSC as a time source in the guest. Regards, Anthony Liguori > François. > > >