THE CRUX: HOW TO VIRTUALIZE THE MACHINE UNDERNEATH THE OS?
The virtual machine monitor must transparently virtualize the machine underneath the OS; what are the techniques required to do so?
Popek and Goldberg virtualization requirements
Sensentive Instructions
Control-sensitive
Update system state, e.g. change GDTR, direct access to PM, VMXON.
Behavior-senstive
Semeantics depends on the system state, e.g. visibility to IDT.
Popek and Goldberg First theorem
For any conventional third-generation computer, a virtual machine monitor may be constructed if the set of sensitive instructions for that computer is a subset of the set of privileged instructions.
Trap and Emulate
source: Operating Systems: Three Easy Pieces
VT-x
Virtual Machine Extensions
- Root/Non-root modes
- VM instructions
Life Cycle of VMM Software
source: Intel® 64 and IA-32 Architectures Software Developer Manuals
VMCS
What’s it?
A data structuwre which control the behavior of processor in VMX non-root mode and control VMX transitions.
source: Hardware and Software Support for Virtualization
What’s in it?
KVM
Write your own hypervisor
source: Using the KVM API
Qemu
source: Hardware and Software Support for Virtualization
Next step
other virtualization techniques
source: Understanding Full Virtualization, Paravirtualization, and Hardware Assist