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;
Perhaps it makes sense to ultimate have an option to run
without prescanning (SBE) for code which doesn't encounter
stuff like this.
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