From owner-freebsd-hackers Sat Oct 19 0:39:14 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C9A7837B404 for ; Sat, 19 Oct 2002 00:39:12 -0700 (PDT) Received: from 002.216-123-229-0.interbaun.com (002.216-123-229-0.interbaun.com [216.123.229.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 167E943E75 for ; Sat, 19 Oct 2002 00:39:12 -0700 (PDT) (envelope-from soralx@cydem.zp.ua) Received: from 254.216-123-229-0.interbaun.com ([192.168.0.3]) by 002.216-123-229-0.interbaun.com (8.11.6/8.11.6) with ESMTP id g9J7d3U00985; Sat, 19 Oct 2002 01:39:04 -0600 (MDT) (envelope-from soralx@cydem.zp.ua) Content-Type: text/plain; charset="koi8-r" From: To: mjoyner2@hq.dyns.cx Subject: Re: vmware2 and simd instructions Date: Sat, 19 Oct 2002 01:38:53 -0600 X-Mailer: KMail [version 1.4] References: <3DAE1642.1030208@hq.dyns.cx> <200210171933.18756.soralx@cydem.zp.ua> <3DAF6FFB.2090409@hq.dyns.cx> In-Reply-To: <3DAF6FFB.2090409@hq.dyns.cx> Cc: freebsd-hackers@FreeBSD.ORG MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200210190138.53850.soralx@cydem.zp.ua> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG >>>is there anyway to lie to vmware2 about the processor installed? or a >>>patch to vmmon to have it lie to the guest os about the processor >>>installed? >>yes >Please enlighten us. >I would like to have more than ancient stuff running in my vmware2 I assume "to lie to vmware2 about the processor installed" means to force vmware2 to report differents CPU features returned by its CPUID instruction. I guess `vmware` reads CPU info from '/usr/compat/linux/proc/cpuinfo' (that is, linuxprocfs) - confirmed by disassembling `vmware`. You may 'lie' to vmware by modifying 'cpuinfo' (i.e., patch for linuxprocfs), but that will make sense only if you want to force vmware2 not to use some CPU feature. You probably need to be able to execute MMX/SSE/SSE2 instructions, and vmware2 doesn't (?) know about them: =BEGIN======/root/.vmware/vmware-log.root=========8<= ... Oct 19 00:48:59: Unknown CPUID Feature 0x3c680000 Oct 19 00:48:59: cpuFeatures == 0x701 ... =END========/root/.vmware/vmware-log.root=========>8= 0x701 means: FPU, CX8, APIC, My CPU Features=0x3febfbff,ACC> As you can see, I have almost all the available features, and vmware2 understans only 701H - no MMX/SSE/SSE2. Therefore, we need to disassemble the code, find the place where VMWare emulates CPUID instruction, and, if EAX=0x01, return EDX: OR EDX,00001101000000000000000000000000b Also, we can find where (code) `vmware` stores CPU features in the 'cpuFeatures' variable (not far from a place where it puts CPUID features to log file) and patch it to always save our value. Moreover, if you want, you can also patch it for returning another CPU ID and stepping. I'll try to check it after the weekend. I don't think this may work at all, since vmware2 probably doesn't have emulation for the advanced instructions, and may generate 'Invalid OpCode' (#UD) exception. So you better think how to make vmware3 working on FreeBSD (port vmmon3)... :) 18.10.2002; 22:59:26 [SorAlx] http://cydem.zp.ua/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message