On Wed, 26 Jul 2000, Kevin Lawton wrote:

> All,
> 
> While I'm at it, figured I might as well add the beginning to
> running guest real-mode (RM) code in the monitor using
> v86 mode.  That brings up some issues on that front to discuss.
> 
> The first is whether to pre-scan RM code pages.  Ideally it
> would be nice not to bother.  But of course, the good people
> at Intel created some less-than-perfect virtualization, even
> of real-mode via v86 mode.  For instance, the classic
> v86 mode detection code:
> 
>   SMSW  some_word
>   if (some_word & 0x0001)  // CR0.PE==1
>     in_v86_mode = 1;
>   else
>     in_v86_mode = 0;
> 
When you are running in real mode sometimes it's nice to know whether you
could have precise timing and access the hardware directly or not (last
case is true for advanced VM86 not like emm386). There could be some int
service used by OS for these purposes though but it's different for every
OS and it's not guaranteed that every OS has it. So maybe this feature is
not so useless.

> Perhaps it makes sense to ultimate have an option to run
> without prescanning (SBE) for code which doesn't encounter
> stuff like this.
> 
I think that making the realmode task to think that there's no VM86 could
only cause more troubles (it might think that it's true rm and go to
access non-standard hardware directly) and perhaps a downgrade of
performance. Performance is very critical for realmode, precision of timer
and the most important - good SB-clone emulation (sound).

> At any rate, what other cases like this will cause trouble?
> Anything that generates an exception when in v86 mode is OK,
> even if it wouldn't in RM.
> 
> -Kevin
> 
> 
Uhus


Reply via email to