From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LKVTZ-0002SR-47 for qemu-devel@nongnu.org; Wed, 07 Jan 2009 05:17:25 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LKVTW-0002SF-SZ for qemu-devel@nongnu.org; Wed, 07 Jan 2009 05:17:24 -0500 Received: from [199.232.76.173] (port=45306 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LKVTW-0002SC-Kj for qemu-devel@nongnu.org; Wed, 07 Jan 2009 05:17:22 -0500 Received: from smtp4-g21.free.fr ([212.27.42.4]:48528) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LKVTV-0004Iv-Sb for qemu-devel@nongnu.org; Wed, 07 Jan 2009 05:17:22 -0500 Received: from smtp4-g21.free.fr (localhost [127.0.0.1]) by smtp4-g21.free.fr (Postfix) with ESMTP id 8EE0F4C8208 for ; Wed, 7 Jan 2009 11:17:14 +0100 (CET) Received: from laptop (vaf26-2-82-244-111-82.fbx.proxad.net [82.244.111.82]) by smtp4-g21.free.fr (Postfix) with ESMTP id A7EDC4C80E8 for ; Wed, 7 Jan 2009 11:17:12 +0100 (CET) In-Reply-To: <08CCD5E4-6559-4F1E-BA05-54FFB0ECE49A@suse.de> Subject: Re: [Qemu-devel] [PATCH 1/2] [RFC] Make vmport report the processor =?utf-8?q?speed?= From: "=?utf-8?q?Fran=C3=A7ois?= Revol" Date: Wed, 07 Jan 2009 11:23:22 +0100 CET Message-Id: <437322790-BeMail@laptop> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 > > > > > On 06.01.2009, at 23:33, Jamie Lokier wrote: > > > 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 =5Fthis=5F code as a guest inside itself, shouldn't it > > =5Fcall=5F > > VMPORT=5FCMD=5FGETPROCSPEED to get the value=3F :-) > > I don't think doing vmware esx in qemu in vmware us that much of a > valid scenario right now ;). > > But I agree with anthony here - not telling vmware esx that it's > running virtualized might be the best. > As I said, it would not only benefit esx. Haiku also would likely work much better this way, and possibly BeOS with a small driver to recalibrate it (I already rewrote such a driver once, but it was just forcing it using a value from some settings that were to be taken from a real machine). Fran=C3=A7ois.