Couple quick thoughts from my current code hacking...
I'm rehashing things a bit so things are more dynamic,
and so the monitor makes no assumptions about having access to
the host when the guest is running.
I couldn't help myself but to restructure things so state
is stored completely in a vm structure, thus there can easily be
multiple VMs. This fit nicely with modularizing things anyways.
vm_t vm[N];
Not done with my rehash yet, but the following issue came to
mind. To make things completely dynamic would mean that the
monitor has to get all pages from the host kernel. If we are
to place a structure (such as a large GDT) across multiple
pages, then manipulating it from the host could be a pain
if the pages are not contiguous.
The largest structure I can think of at the moment, that I'd
like to keep contiguous is say a full GDT (64K). Am I going
to run into troubles trying to get something <=64K allocated
from any of the host kernels, but which is contiguous?
If this is a pain, I could place static variable declarations
in the kernel code, and use that memory instead. I hate to
have the kernel driver use memory until it needs to, but it's
not a huge amount. Or I could stop being such as wuss, and
make some macros to access multi-page structures. :^)
Thanks,
-Kevin