From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LKSN2-00035C-Oc for qemu-devel@nongnu.org; Wed, 07 Jan 2009 01:58:28 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LKSN1-000350-7K for qemu-devel@nongnu.org; Wed, 07 Jan 2009 01:58:28 -0500 Received: from [199.232.76.173] (port=33429 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LKSN1-00034x-1l for qemu-devel@nongnu.org; Wed, 07 Jan 2009 01:58:27 -0500 Received: from mx2.suse.de ([195.135.220.15]:38018) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LKSN0-0005Ul-In for qemu-devel@nongnu.org; Wed, 07 Jan 2009 01:58:26 -0500 Message-ID: <496452A2.2050209@suse.de> Date: Wed, 07 Jan 2009 07:58:42 +0100 From: Alexander Graf MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 1/2] [RFC] Make vmport report the processor speed References: <1231171871-2320-1-git-send-email-agraf@suse.de> <1231171871-2320-2-git-send-email-agraf@suse.de> <4962373E.3080808@codemonkey.ws> In-Reply-To: <4962373E.3080808@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 Anthony Liguori 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! >> > > Have you tried just disabling vmport? If I don't expose vmport or the command in that patch is not implemented I get the following error when booting ESX: Timer: InitPseudoTSC:3940: cpu 0: measured cpu and bus speeds conflict (PR34866) 0:00:00:00.149 cpu0:1024)ALERT: Timer: InitPseudoTSC:3940: cpu 0: measured cpu and bus speeds conflict (PR34866) 0:00:00:00.150 cpu0:1024)Timer: InitPseudoTSC:4002: node 0 (cpus 0-0): consensus bus speed 1051144973 Hz 0:00:00:00.152 cpu0:1024)Timer: InitPseudoTSC:4047: TSC speed=2102289946 Hz, cpu speed=2102289946 Hz, bus speed=1051144973 Hz 0:00:00:00.153 cpu0:1024)Timer: InitPseudoTSC:4075: timerRCToTC mult=0x1, shift=0, add=0x0 Init: VMKernel:811: Timer_InitPseudoTSC failed:0xbad00c1 0:00:00:00.155 cpu0:1024)ALERT: Init: VMKernel:811: Timer_InitPseudoTSC failed:0xbad00c1 I don't really think we'll ever get timings accurate enough for such a check. Alex