Since this thread is coming up again...
FWIW, there is a facility in plex86 to set/get the full CPU state
from kernel space. Most of the kernel vm_t state can be intialized
based on the guest CPU state; caches start empty, the page tables
start empty, etc. The abstraction of having a given amount of
guest memory + CPU state can help make things more sane for
saving/restoring guest state.
There are always details which complicate things. There are
areas like notions of time in the monitor, and other factors
peripheral to the CPU/memory state that need to be saved/restored.
In the host user space, every plugin (hardware emulation etc),
every service (time references etc) has to be compliant with
a save/restore interface.
There are issues here. The user process does not contain all
the existing state. Services which it uses which are handled
by external libs/services, such as graphics, file IO, time, and
others can complicate a save/restore architecture. Using direct
graphics libs for example, can complicate things.
Then there is the issue of formats. First, do you store dumped
data in binary or text? Binary is easier, but text is more flexible,
and allows you to potentially restore from a previous dump after
some modifications.
Looking forward, it is possible we may put parts of some hardware
emulation in the VM monitor, rather than in the host user space,
for performance reasons. Thus, the save/restore interface would
have to extend into the monitor space.
Having a save/restore facility is really handy. A couple points
I'm going to make.
- This is an involved architectural change. And there are more
pressing things to be doing at this time. Performance, UI,
documentation, better video support, and BIOS updates need
to come first.
- We may be getting help in this area, in which case we won't
have to reinvent this wheel. That's all I'm saying for now.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Kevin Lawton [EMAIL PROTECTED]
MandrakeSoft, Inc. Plex86 developer
http://www.linux-mandrake.com/ http://www.plex86.org/