Open ionescu007 opened 8 years ago
Thanks for this proposal. Running with other hypervisors would be good enhancement. In order to assess amount of work and priority, can you tell me a couple of things?
VMCS-shadowing allows hardware-accelerated support for vmread, vmwrite instructions, where VMCS fields can be stored in VMX-specific format, keeping VMM robust. It allows certain fields of VMCS reading/writing won't be intercepted by VMM, which means vmread and vmwrite instructions won't be VM-Exit of obligation. Since shadow-VMCS can be both read/written by VM and VMM, it becomes simple when it comes to analyze VMCS. To virtualize VM-Entry, vmlaunch and vmresume will be intercepted. Replace guest rip with guest rip in shadow-VMCS and execute vmresume. Perform source check is requried (e.g. guest has executed vmxon successfully, loaded VMCS successfully etc.) Note that msr-loading should be performed on emulated VM-Entry. To virtualize VM-Exit, replace guest rip with host rip in shadow-VMCS and execute vmresume. Note that msr-loading and msr-storing should be performed on emulated VM-Exit. Emulate a VMX-Abort if certain condition is met. For Intel EPT emulation, merge the page table.
This would allow using hyperplatform while still enjoying the use of Virtual Box, VMWare, or other virtualization software (note that supporting Hyper-V would not be possible, as it enables the hypervisor at boot).