Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Support for VMCS Shadowing #14

Open
ionescu007 opened this issue Mar 15, 2016 · 2 comments
Open

Enhancement: Support for VMCS Shadowing #14

ionescu007 opened this issue Mar 15, 2016 · 2 comments

Comments

@ionescu007
Copy link

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).

@tandasat
Copy link
Owner

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?

  1. Do you think I can test a fix on a VMware VM that also run VMware or VirtualBox?
    As I do not have facility to debug a real device, it would be great if I can reproduce the issue and test a fix on a virtual machine.
  2. Do you know of any references can be helpful for researching and implementing the enhancement?
    I was not quite familiar with VMCS shadowing and thought it was only for implementing nested-VM. If you could tell me anything could be helpful for understanding the idea (ie, other project's source code, presentation slides etc), that would help me estimate amount of work and speed up development.

@Zero-Tang
Copy link

Zero-Tang commented Aug 13, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants