Difference between VMX root mode and non-VMX mode (VMX OFFed)

Difference between VMX root mode and non-VMX mode (VMX OFFed)

Is there no difference between VMX root mode and non-VMX mode (when VMX is disabled or VMXOFFed) apart from -
i) certain values can't be loaded into certain CRs in VMX mode, and
ii) these new VMX operations are available in VMX mode.

If that is the case, the VMM has all the priviledges of the OS-kernel. So, in a scenario where the VMM installs on top of the OS-kernel (or as a module in it), the VMM can starve the other non-VM processes of the host OS

e.g. consider this sequence of events:

i) VMXON switches control to the VMM
ii) VMM launches VM1
iii) VM1 VM-exits
iv) VMM launches VM2
iv) VM2 Vm-exits
v) VMM resumes VM1
vi) VM1 VM-exits
vii) VMM resumes VM2
viii) VM2 Vm-exits
---
this could keep on repeating, what about the other host OS applications ? What if the VMM doesn't executes VMXOFF ?

Also, why the restrition on the 'values that can be loaded into the CRs' ?

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

After VMXON, the VMM is the vehicle for system schedule.
After VMXON you operate in root mode. The VMM may use a helper guest [ XEN Dom0 for example to assist in management]
The VMM can Launch a Guest [ VmLaunch or VmResume ] [ on a particular processing thread ]
The guest will run until it does something to cause a VmExit or a timeout forces a VmExit.
Their are about 32 of these somethings. They are designed to keep the Guest contained.
Without Root Mode, the special "VMEXIT" controls are not active to "protect/manage" the operations of the "guest".
Note: VMEXIT is not a command but a response to a guest attempting to do a "protected" request.
If the guest was not "launched" from the root, this special relationship does not exist.

In this case, the host scheduler will switch from VM1/VM2 (usually a process in host OS) to non-VM process, so no startving happens.
There is no need to execute VMXOFF normally except you want to quit from VMX mode, if yes, then you can never execute VM Resume/Launch instruction.

Leave a Comment

Please sign in to add a comment. Not a member? Join today