Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Oct 2002 23:13:49 -0400
From:      wolf <mjoyner2@hq.dyns.cx>
To:        soralx@cydem.zp.ua
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: vmware2 and simd instructions
Message-ID:  <3DB21F6D.30504@hq.dyns.cx>
References:  <3DAE1642.1030208@hq.dyns.cx> <200210171933.18756.soralx@cydem.zp.ua> <3DAF6FFB.2090409@hq.dyns.cx> <200210190138.53850.soralx@cydem.zp.ua>

next in thread | previous in thread | raw e-mail | index | archive | help


soralx@cydem.zp.ua wrote:

>>>>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, <b10 - reserved?>
> 
> My CPU Features=0x3febfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,
> MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,<b28>,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/
> 



 From what I have gathered doing web seaches, the cpuid opcode is *not* 
trappable. :(

when trying to boot a redhat 7.3 kernel I get the following
messages in my vmware file: (abbreviated for brevity's sake)

Oct 16 23:44:46: NOT TESTED (warning) F(127):645
Oct 16 23:44:46: NOT TESTED (warning) F(127):645
Oct 16 23:44:46: NOT TESTED (warning) F(127):645
.
.
.
Oct 16 23:44:46: NOT TESTED (warning) F(122):1912
.
.
.
Oct 16 23:44:47: NOT TESTED (warning) F(127):645
Oct 16 23:44:47: F(140) line=1893 0x10:0xc02660bc fault=13
.
.
.


Seems like there should be a way to trap the fault 13
to not have the guest os panic or blue screen.

I would be willing to help get the vmmon3 running if someone
who can actually kernel code would let me help them. :)
  I currently have enough drive space free so that I can build
a clean chroot/jailed environment for testing purposes.

Poking around in the auto-install perl script they ship, leads me
to believe we would need to write a FreeBSD install script, using
theirs as a basis simply for what type of operations need doing and
when.



-Mike




-- 
Michael Joyner
FreeBSD System Administrator
http://manhattan.hq.dyns.cx/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3DB21F6D.30504>