Kevin Lawton wrote:
> I hope so too. Wasn't sure if any of the Windows variants
> suffered some braindeath here.
Well, at least Win9x don't even reload CR3 when switching to
another process context :-/ In this case, just a subset of
the page directory is copied over ... [ CR3 reloading only
happens between different VMs, i.e. when running DOS boxes. ]
> The reason I asked was as follows. I have
> to rebuild the monitor page tables dynamically upon CR3
> reload, and if we are running all guest code at CPL3, then
> upon a privilege level transition. The reason for the second
> case is that the page permissions have to be tailored for
> the current guest (requested) privilege level.
Well ... you needn't necessarily throw everything away on
ring transitions. You could e.g. cache two sets of page
tables, or maybe modify the current tables ...
> There's some issues surrounding running guest
> code at ring1, but I think they can be solved.
Hmm. I guess the core problem is this: we need to have at least
the GDT, IDT, LDT, TSS, and the interrupt stubs pointed to by the IDT
actually mapped into the address space whenever running guest code.
Unless we can use page level protection, we can't hide these from the
guest's view. (I don't think this can be done with segment protection,
unless we make assumptions about the guest's use of segments ...)
Furthermore, unless we want the guest to be able to crash the
machine, we need to map those structures read-only at least, which
means we have to keep modifying the page tables if we do want to
change those structures in the monitor. But to modify page tables,
we have to keep *these* mapped somewhere (read-write!), which means
the guest can modify them as well :-/
Bye,
Ulrich
--
Dr. Ulrich Weigand
[EMAIL PROTECTED]