Before 1998, it was impossible to virtualize Intel x86 systems. VMware introduced a technique called binary translation. In 2006, Intel introduced VT-x virtualization technology for x86. This was hardware support for virtualization by Intel. This presentation discusses what kind of support does Intel provides for virtualization in detail. It also discusses different implementation techniques in brief.
3. History
• Virtual Machine concept introduced by IBM in late 1960s.
• It was difficult for Intel x86 to virtualize because it was not satisfying
the constraints
13. VT-x Operating Modes
• Set of processor operations called VMX operations
• Two kinds of VMX operation
14. VT-x Operating Modes
• Set of processor operations called VMX operations
• Two kinds of VMX operation
• VMX root operation
• Fully privileged, generally for VMM
15. VT-x Operating Modes
• Set of processor operations called VMX operations
• Two kinds of VMX operation
• VMX root operation
• Fully privileged, generally for VMM
• VMX non-root operation
• Not fully privileged, generally for guest
• Reduces the privilege of guest software developed to operate in ring 0
17. VM Entry and Exit
• Two types of transitions
• VM entry
• Transition from VM root operation to VM non root operation
• Loads guest state from VMCS
• Stores VMM state to VMCS
18. VM Entry and Exit
• Two types of transitions
• VM entry
• Transition from VM root operation to VM non root operation
• Loads guest state from VMCS
• Stores VMM state to VMCS
• VM exit
• Transition from VM non-root operation to VM root operation
• Stores guest state to VMCS
• Loads VMM state from VMCS
19. VM Entry and Exit
Guest 0 Guest 1
VMM
VMXON VMXOFF
VM
EntryVM Exit VM Exit
Picture: Copied from Intel Manual Sept 2014
21. Virtual Machine Control Structure
• Control Structures stored in memory
• One VMCS active per virtual processor at a time
22. Virtual Machine Control Structure
• Control Structures stored in memory
• One VMCS active per virtual processor at a time
• Stores guest state, host state, VMX controls and VM-exit information
23. VM Exits in VMX Non-Root Operation
• Some instructions cause VM-exit unconditionally
• e.g. CPUID, INVD, XSETBV, INVEPT, VMCLEAR, VMLAUNCH, etc.
24. VM Exits in VMX Non-Root Operation
• Some instructions cause VM-exit unconditionally
• e.g. CPUID, INVD, XSETBV, INVEPT, VMCLEAR, VMLAUNCH, etc.
• Some instructions cause VM-exit conditionally based on VM-
execution control settings in VMCS
• e.g. HLT, INVLPG, MONITOR, VMREAD, etc.
25. VM Exits in VMX Non-Root Operation
• Some instructions cause VM-exit unconditionally
• e.g. CPUID, INVD, XSETBV, INVEPT, VMCLEAR, VMLAUNCH, etc.
• Some instructions cause VM-exit conditionally based on VM-
execution control settings in VMCS
• e.g. HLT, INVLPG, MONITOR, VMREAD, etc.
• Exceptions
26. VM Exits in VMX Non-Root Operation
• Some instructions cause VM-exit unconditionally
• e.g. CPUID, INVD, XSETBV, INVEPT, VMCLEAR, VMLAUNCH, etc.
• Some instructions cause VM-exit conditionally based on VM-
execution control settings in VMCS
• e.g. HLT, INVLPG, MONITOR, VMREAD, etc.
• Exceptions
• Triple Faults
27. VM Exits in VMX Non-Root Operation
• Some instructions cause VM-exit unconditionally
• e.g. CPUID, INVD, XSETBV, INVEPT, VMCLEAR, VMLAUNCH, etc.
• Some instructions cause VM-exit conditionally based on VM-
execution control settings in VMCS
• e.g. HLT, INVLPG, MONITOR, VMREAD, etc.
• Exceptions
• Triple Faults
• External Interrupts
28. VM Exits in VMX Non-Root Operation
• Some instructions cause VM-exit unconditionally
• e.g. CPUID, INVD, XSETBV, INVEPT, VMCLEAR, VMLAUNCH, etc.
• Some instructions cause VM-exit conditionally based on VM-
execution control settings in VMCS
• e.g. HLT, INVLPG, MONITOR, VMREAD, etc.
• Exceptions
• Triple Faults
• External Interrupts
• Non-Maskable Interrupts
29. VM Exits in VMX Non-Root Operation
• Some instructions cause VM-exit unconditionally
• e.g. CPUID, INVD, XSETBV, INVEPT, VMCLEAR, VMLAUNCH, etc.
• Some instructions cause VM-exit conditionally based on VM-
execution control settings in VMCS
• e.g. HLT, INVLPG, MONITOR, VMREAD, etc.
• Exceptions
• Triple Faults
• External Interrupts
• Non-Maskable Interrupts
and more…
30. References
• Intel 64 and IA-32 Architectures Software Developer’s Manual Volume 3
• Understanding Intel Virtualization Technology (Power point
presentation) by Narendar B. Sahgal and Dion Rodgers
• Understanding Full Virtualization, Paravirtualization and Hardware-assist
by VMware