From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LKKU0-0002J5-DN for qemu-devel@nongnu.org; Tue, 06 Jan 2009 17:33:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LKKTy-0002IA-Ve for qemu-devel@nongnu.org; Tue, 06 Jan 2009 17:33:08 -0500 Received: from [199.232.76.173] (port=56305 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LKKTy-0002I6-Lz for qemu-devel@nongnu.org; Tue, 06 Jan 2009 17:33:06 -0500 Received: from mail2.shareable.org ([80.68.89.115]:52826) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LKKTy-0001xo-2B for qemu-devel@nongnu.org; Tue, 06 Jan 2009 17:33:06 -0500 Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from ) id 1LKKTw-00075L-5K for qemu-devel@nongnu.org; Tue, 06 Jan 2009 22:33:04 +0000 Date: Tue, 6 Jan 2009 22:33:04 +0000 From: Jamie Lokier Subject: Re: [Qemu-devel] [PATCH 1/2] [RFC] Make vmport report the processor speed Message-ID: <20090106223303.GC25563@shareable.org> References: <1231171871-2320-1-git-send-email-agraf@suse.de> <1231171871-2320-2-git-send-email-agraf@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1231171871-2320-2-git-send-email-agraf@suse.de> 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 Alexander Graf 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. WARNING: This > implementation breaks on non-x86 hosts! If you run _this_ code as a guest inside itself, shouldn't it _call_ VMPORT_CMD_GETPROCSPEED to get the value? :-) -- Jamie