f45a747e59
all the memory it needs, and the plex86 kernel module uses get_user_pages() from the Linux kernel to get at them and pin the few that are needed statically (and later up to a watermark of pages that are needed dynamically). Guest physical memory pages are now dynamically pinned/unpinned. For now, I use a hard limit of 4Megs of pinned pages and a really primitive algorithm to decide which one to unpin when the limit is reached and one needs to be bumped. Seems to work. Though I haven't run into the limit yet since I'm using just a small test program.
81 lines
2.5 KiB
Plaintext
81 lines
2.5 KiB
Plaintext
Main monitor loop should compare cycles burned thus far vs
|
|
cycles requested, so it doesn't keep bopping back and forth
|
|
between host-kernel and monitor spaces without returning to
|
|
user space.
|
|
|
|
Fix monPrint and friends.
|
|
monpanic breaks up into 2 monprints which hit user space twice.
|
|
|
|
Could put the GDT/LDT in linear memory where the guest
|
|
expects them.
|
|
|
|
Synchronize page writes with iCache in bochs.
|
|
|
|
Deal with cycle counts of guest execution in VM, and in
|
|
bochs/plex86 shim.
|
|
|
|
Deal with page_usage. How do we update this between timeslices?
|
|
Do we always clear it? Maybe we should keep a log of things to
|
|
clear (page_usage, GDT entries, PDE entries, ...) and clear those
|
|
before returning to user space.
|
|
|
|
GDT entries for guest need to be cleared upon return from guest
|
|
execution, or just cleared before invocation of the guest.
|
|
|
|
Task segment must be a 32-bit'er.
|
|
|
|
Save/restore floating point state of host/VM.
|
|
|
|
deduct off some cycles for the IRET/int sequence.
|
|
|
|
Conditions for bochs compile using plex86:
|
|
- Not compiled for debug
|
|
- x86 host
|
|
- Not PCI supported (for now).
|
|
|
|
paging-mon.c: We can eliminate any code other than CPL==3.
|
|
|
|
Fix extra PDBR reload in nexus.S
|
|
|
|
Manipulation/reading of host page tables needs to be SMP/preempt
|
|
compatible. Need to do spin-lock (big kernel lock for old Linux)
|
|
on vma.
|
|
|
|
==================== From previous plex86 TODO file ====================
|
|
|
|
This is a list of the major tasks/achievements/milestones yet to-do.
|
|
We should keep this list prioritized, creating sort of a road map.
|
|
Hopefully, this will reduce duplicate suggestions on the developers
|
|
channels, and let people know where we are in the development process.
|
|
Entries listed first have highest priority.
|
|
|
|
<NEAR-TERM>
|
|
- Fix plex86 on Linux 2.4.x/SMP or with 1P and LAPIC enabled.
|
|
|
|
- Save FPU state on host <--> monitor context switch.
|
|
|
|
- Special guest-specific drivers and special emulated pseudo-devices
|
|
for faster graphics/network/disk access.
|
|
|
|
- Allow some of the inactive guest pages be host swappable.
|
|
Currently, all pages are locked down.
|
|
|
|
- Many performance enhancements (see PERFORMANCE)
|
|
|
|
- Allow memory to be mapped anywhere in the physical address
|
|
space.
|
|
|
|
- Allow certain guest pages to be swap eligible by the host.
|
|
This means they will have to be unavailable by the guest
|
|
during that time. Need a dynamic algorith for this.
|
|
|
|
- Test on 2.4 with SMP/APIC enabled on single processor machine.
|
|
|
|
- Deal with guest use of TF.
|
|
|
|
- Deal with LDT
|
|
|
|
|
|
unallocVmPages/unreserve_guest_pages called twice,
|
|
release & teardown.
|