From: minyard@crchh453.bnr.ca (Corey Minyard) Subject: Re: VM386? Possible? Date: Tue, 01 Sep 1992 18:57:07 GMT
In article <la78t4INN738@appserv.Eng.Sun.COM>, lm@slovax.Eng.Sun.COM (Larry McVoy) writes:
|> Forgive my ignorance, but is it possible to run a 386 program on a
|> virtual 386 on a real 386? The reason I ask is this: aren't a lot
|> of dos programs running in 386 mode? So even if you got VM86 working
|> and got a dos emulator running, wouldn't things like windows apps
|> not run at all? Or is everything still running as an 8086?
|>
|> Thanks.
|> ---
|> Larry McVoy (415) 336-7627 lm@sun.com
Unfortunately, no. The problem comes in with the PUSHFD/POPFD
instructions. PUSHFD will put the status register (including processor
mode) onto the stack. POPFD will restore the status register from
the stack. If in supervisor mode, POPFD will restore the processor
mode bits (VM86, I/O priv, etc.). If not in supervisor mode, POPFD
will not trap but it will not restore these bits. So, there is no
way for a virtual machine control program to know if the program
running in the virtual machine is looking at the processor mode or
trying to change the processor mode via these instructions.
I guess you could write a full 386 simulator, but that would not
be terribly fast.
======================================================================
Corey Minyard