tomk@intsc.UUCP (Tom Kohrs) (11/18/86)
> The recent BYTE article on the 80386 and virtualization indicated that > it is not possible to have a 386 completely virtualize itself, as > opposed to virtualizing the 8086 or 80286. Is this true? If it is, are > there any rules that operating system developers could follow that would > guarantee that an operating system could be run in virtual mode? Virtualization in this context refers to the ability to have the cpu run a Virtual Machine OS. An example is VM370. One of the requirements for being able to run a VM type os is that any other os (including a copy of itself) as a task or process without it being able to detect (other than by performance) that it does not control the cpu. As an example the os that is running under the VM os has to believe that it can completely control the machine status word and that everything that it writes there will effect the hardware directly (ie. enabling and disabling the interrupts). Hardware support required to do this effectively requires the ability to write protect certain registers in the CPU from other tasks that are running at the os privilege level and cause those acesses to trap to the VM os. The VM os would then emulate the function of the write to the MSW and return the appropriate results to the child os. There are some tricks to writing a VM os that allow it to function on a machine that does not have all of the hardware traps. This can be done by loading the child os at a level lower than the VM os and doing emulation of the os level functions. Other tricks include adding specialized hardware to the system. ***WARNING*** I am basically a hardware type so don't take all of this as absolute gospel. Also interjection by someone that understands Virtual OS's would be appreciated (Cliff?). Virtualizing the 286 mode presents the same problems that the 32bit mode does (they are really the same mode just different path widths in the execution unit). So running 286 XENIX under UNIX system V.3/386 is not intended to work. The virtual 86 mode is a different matter. When the os loads a task as a virtual 86 program the entire environment (86 os and application) is run as at the application level. Since the 8086 did not have the concept of privilege levels the programs and os's don't expect to be able to change them. As far as guide lines for writing a VM os or an os to run under a VM os, I will leave that to people who know better what is involved. -- ------ "Ever notice how your mental image of someone you've known only by phone turns out to be wrong? And on a computer net you don't even have a voice..." tomk@intsc.UUCP Tom Kohrs Regional Architecture Specialist Intel - Santa Clara