SlideShare a Scribd company logo
Hypervisors
Inzemamul Haque
02 March 2015
Motivation
• In some situations, organizations need different computers but
actually do not want it.
Motivation
• In some situations, organizations need different computers but
actually do not want it.
• E.g. a company has e-mail server, web server, FTP server, etc.
Motivation
• In some situations, organizations need different computers but
actually do not want it.
• E.g. a company has e-mail server, web server, FTP server, etc.
• Due to reliability, use separate machines
Motivation
• In some situations, organizations need different computers but
actually do not want it.
• E.g. a company has e-mail server, web server, FTP server, etc.
• Due to reliability, use separate machines
Solution is virtualization
Virtualization
• Allows a single computer to run different virtual systems (Virtual
Machines).
Virtualization
• Allows a single computer to run different virtual systems (Virtual
Machines).
• Abstracts the hardware of a single computer into different execution
environments
Virtualization
• Allows a single computer to run different virtual systems (Virtual
Machines).
• Abstracts the hardware of a single computer into different execution
environments
• Creates illusion that each execution environment is running on its
own private computer
Virtualization
• Allows a single computer to run different virtual systems (Virtual
Machines).
• Abstracts the hardware of a single computer into different execution
environments
• Creates illusion that each execution environment is running on its
own private computer
• Failure in one virtual machine do not affect other virtual machines
Types of Hypervisors
• Type 1 hypervisor
Types of Hypervisors
• Type 1 hypervisor
Type 1 Hypervisor
Hardware
Windows Linux
Types of Hypervisors
• Type 1 hypervisor
• Type 2 hypervisor
Type 1 Hypervisor
Hardware
Windows Linux
Types of Hypervisors
• Type 1 hypervisor
• Type 2 hypervisor
Type 1 Hypervisor
Hardware
Windows Linux Type 2 Hypervisor
Hardware
Guest OS
Host Operating System
Other OS
processes
Type 1 Hypervisor Type 2 Hypervisor
Requirements for Virtualization
• CPU has some instructions which can only be executed in kernel
mode e.g. perform I/O, changing MMU settings, etc.
Requirements for Virtualization
• CPU has some instructions which can only be executed in kernel
mode e.g. perform I/O, changing MMU settings, etc.
• These instructions are called sensitive instructions
Requirements for Virtualization
• CPU has some instructions which can only be executed in kernel
mode e.g. perform I/O, changing MMU settings, etc.
• These instructions are called sensitive instructions
• Some instructions cause a trap if executed in user mode
Requirements for Virtualization
• CPU has some instructions which can only be executed in kernel
mode e.g. perform I/O, changing MMU settings, etc.
• These instructions are called sensitive instructions
• Some instructions cause a trap if executed in user mode
• These instructions are called privileged instructions
Requirements for Virtualization
• CPU has some instructions which can only be executed in kernel
mode e.g. perform I/O, changing MMU settings, etc.
• These instructions are called sensitive instructions
• Some instructions cause a trap if executed in user mode
• These instructions are called privileged instructions
• A machine is virtualizable if sensitive instructions are subset of
privileged instructions.
Popek and Goldberg, Formal Requirements for Virtualizable Third Generation Architectures, Commun. Of
ACM, 1974
Different Techniques of Implementation
• Binary translation
• Paravirtualization
• Hardware support
Binary Translation
….
….
Sensitive
instruction
….
….
Basic Block in
code of guest OS
Binary Translation
….
….
Sensitive
instruction
….
….
Basic Block in
code of guest OS
….
….
VMware
procedure
….
….
Paravirtualization
• Modifies guest OS source code, and directly executes hypervisor calls
Hardware Support – Bird’s-eye View
• In 2006, Intel introduced VT-x
Hardware
OS
User
Applications
VMM
Hardware Support – Bird’s-eye View
• In 2006, Intel introduced VT-x
Hardware
OS
User
Applications
VMM
VMX Root
Mode
VMX
Non-Root
Mode
VT-x Operating Modes
• Set of processor operations called VMX operations
VT-x Operating Modes
• Set of processor operations called VMX operations
• Two kinds of VMX operation
VT-x Operating Modes
• Set of processor operations called VMX operations
• Two kinds of VMX operation
• VMX root operation
• Fully privileged, generally for VMM
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
VM Entry and Exit
• Two types of transitions
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 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
VM Entry and Exit
Guest 0 Guest 1
VMM
VMXON VMXOFF
VM
EntryVM Exit VM Exit
Picture: Copied from Intel Manual Sept 2014
Virtual Machine Control Structure
• Control Structures stored in memory
Virtual Machine Control Structure
• Control Structures stored in memory
• One VMCS active per virtual processor at a time
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
VM Exits in VMX Non-Root Operation
• Some instructions cause VM-exit unconditionally
• e.g. CPUID, INVD, XSETBV, INVEPT, VMCLEAR, VMLAUNCH, etc.
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.
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
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
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
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
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…
References
• A.S.Tanenbaum, Modern Operating Systems, 3rd Edition,2008
• Abraham Silberschatz, Peter B. Galvin, Greg Gagne, Operating System
Concepts, 8th Edition, 2010
• Understanding Full Virtualization, Paravirtualization and Hardware-assist
by VMware
• Understanding Intel Virtualization Technology (Power point presentation)
by Narendar B. Sahgal and Dion Rodgers
• Intel 64 and IA-32 Architectures Software Developer’s Manual Volume 3

More Related Content

What's hot (20)

ODP
Kvm virtualization platform
Ahmad Hafeezi
 
PPTX
A day in the life of a VSAN I/O - STO7875
Duncan Epping
 
PDF
Linux: LVM
Michal Sedlak
 
PPTX
Virtualization 101
Gaurav Marwaha
 
PPTX
Hypervisor
kalpita surve
 
PDF
Virtualization with KVM (Kernel-based Virtual Machine)
Novell
 
PPTX
Server virtualization
Kingston Smiler
 
PPTX
Virtualization
Kumar Harsha
 
PDF
Zabbix Performance Tuning
Ricardo Santos
 
PPTX
Server virtualization
ofsorganizer
 
PPTX
What is Virtualization and its types & Techniques.What is hypervisor and its ...
Shashi soni
 
PDF
Vmware overview
Syed Zeeshan
 
PPTX
VSICM8_M02.pptx
MazharUddin34
 
PDF
Intro to containerization
Balint Pato
 
PDF
Xen Hypervisor
Susheel Thakur
 
PDF
Ceph Block Devices: A Deep Dive
Red_Hat_Storage
 
PPTX
Virtualization concept slideshare
Yogesh Kumar
 
PPTX
virtualization and hypervisors
Gaurav Suri
 
PPTX
What is Virtualization
Dhrupesh Kotadiya
 
PDF
cloud virtualization technology
Ravindra Dastikop
 
Kvm virtualization platform
Ahmad Hafeezi
 
A day in the life of a VSAN I/O - STO7875
Duncan Epping
 
Linux: LVM
Michal Sedlak
 
Virtualization 101
Gaurav Marwaha
 
Hypervisor
kalpita surve
 
Virtualization with KVM (Kernel-based Virtual Machine)
Novell
 
Server virtualization
Kingston Smiler
 
Virtualization
Kumar Harsha
 
Zabbix Performance Tuning
Ricardo Santos
 
Server virtualization
ofsorganizer
 
What is Virtualization and its types & Techniques.What is hypervisor and its ...
Shashi soni
 
Vmware overview
Syed Zeeshan
 
VSICM8_M02.pptx
MazharUddin34
 
Intro to containerization
Balint Pato
 
Xen Hypervisor
Susheel Thakur
 
Ceph Block Devices: A Deep Dive
Red_Hat_Storage
 
Virtualization concept slideshare
Yogesh Kumar
 
virtualization and hypervisors
Gaurav Suri
 
What is Virtualization
Dhrupesh Kotadiya
 
cloud virtualization technology
Ravindra Dastikop
 

Viewers also liked (20)

PPTX
Formal methods 7 - category theory
Vlad Patryshev
 
PPTX
Formal methods 3 - languages and machines
Vlad Patryshev
 
PPTX
Formal methods 5 - Pi calculus
Vlad Patryshev
 
PDF
Formal methods 6 - elements of algebra
Vlad Patryshev
 
PPT
Formal meth
memoalwandy
 
PPTX
#7 formal methods – loop proof examples
Sharif Omar Salem
 
PPTX
Formal methods 2 - languages and machines
Vlad Patryshev
 
PPTX
#2 formal methods – principles of logic
Sharif Omar Salem
 
PPTX
Introduction to formal methods
Inzemamul Haque
 
PPTX
Formal methods 1 - introduction
Vlad Patryshev
 
PPTX
Software Quality Assurance(Intro)
Sidra Ashraf
 
PPTX
#8 formal methods – pro logic
Sharif Omar Salem
 
PPTX
Virtualization support by intel
Inzemamul Haque
 
PDF
Formal methods 8 - category theory (last one)
Vlad Patryshev
 
PPTX
#5 formal methods – hoare logic
Sharif Omar Salem
 
PPTX
#6 formal methods – loop proof using induction method
Sharif Omar Salem
 
PPT
Slides chapters 28-32
Priyanka Shetty
 
PDF
Truth, deduction, computation lecture 7
Vlad Patryshev
 
PPTX
Formal Methods lecture 01
Sidra Ashraf
 
PPTX
PhD Presentation (Doctorate)
Sharif Omar Salem
 
Formal methods 7 - category theory
Vlad Patryshev
 
Formal methods 3 - languages and machines
Vlad Patryshev
 
Formal methods 5 - Pi calculus
Vlad Patryshev
 
Formal methods 6 - elements of algebra
Vlad Patryshev
 
Formal meth
memoalwandy
 
#7 formal methods – loop proof examples
Sharif Omar Salem
 
Formal methods 2 - languages and machines
Vlad Patryshev
 
#2 formal methods – principles of logic
Sharif Omar Salem
 
Introduction to formal methods
Inzemamul Haque
 
Formal methods 1 - introduction
Vlad Patryshev
 
Software Quality Assurance(Intro)
Sidra Ashraf
 
#8 formal methods – pro logic
Sharif Omar Salem
 
Virtualization support by intel
Inzemamul Haque
 
Formal methods 8 - category theory (last one)
Vlad Patryshev
 
#5 formal methods – hoare logic
Sharif Omar Salem
 
#6 formal methods – loop proof using induction method
Sharif Omar Salem
 
Slides chapters 28-32
Priyanka Shetty
 
Truth, deduction, computation lecture 7
Vlad Patryshev
 
Formal Methods lecture 01
Sidra Ashraf
 
PhD Presentation (Doctorate)
Sharif Omar Salem
 
Ad

Similar to Hypervisors (20)

PPTX
KIIT_Cloud_scaling and Virtualization.pptx
bhaskarkumar0125
 
PPT
CC_virtualization is in the cloud UNIT 3.1.ppt
RahulBhole12
 
PPTX
Operating system Virtualization_NEW.pptx
Senthil Vit
 
PPTX
Virtualization of computing and servers
pooranionline
 
PPT
Virtualization
satchipatra
 
PPTX
Virtualization-Presentation-with-History
Sachin Darekar
 
PDF
virtual-machine-150316004018-conversion-gate01.pdf
KowsalyaJayakumar2
 
PPTX
Virtual machine
IGZ Software house
 
PDF
IaaS - Virtualization_Cambridge.pdf
DharavathRamesh2
 
PPT
Unit II.ppt
HARISHK762704
 
PPTX
CC CLOUD RESOURCE VIRTUALIZATION PPT TO REFER
2021ismadhuprasadrna
 
PDF
D1 t2 jonathan brossard - breaking virtualization by switching to virtual 8...
kbour23
 
PDF
virtualization (1).pdf bbbbbbbnnnnnjnjjjjj
girisaksham3
 
PDF
Cloud Computing Virtualization and containers
Selvaraj Kesavan
 
PDF
Cloud computing | Cloud security | unit 2
dumhack90
 
PPTX
virtualization.pptx
ssuser6e6eec
 
PPT
virtual machine.ppt
SushantShinde74
 
PPT
Virtualization (Distributed computing)
Sri Prasanna
 
PDF
AOS Lab 11: Virtualization
Zubair Nabi
 
PPTX
CSC_406_5_Virtualization - Case Study, it's base on virtualization
dolandarc2
 
KIIT_Cloud_scaling and Virtualization.pptx
bhaskarkumar0125
 
CC_virtualization is in the cloud UNIT 3.1.ppt
RahulBhole12
 
Operating system Virtualization_NEW.pptx
Senthil Vit
 
Virtualization of computing and servers
pooranionline
 
Virtualization
satchipatra
 
Virtualization-Presentation-with-History
Sachin Darekar
 
virtual-machine-150316004018-conversion-gate01.pdf
KowsalyaJayakumar2
 
Virtual machine
IGZ Software house
 
IaaS - Virtualization_Cambridge.pdf
DharavathRamesh2
 
Unit II.ppt
HARISHK762704
 
CC CLOUD RESOURCE VIRTUALIZATION PPT TO REFER
2021ismadhuprasadrna
 
D1 t2 jonathan brossard - breaking virtualization by switching to virtual 8...
kbour23
 
virtualization (1).pdf bbbbbbbnnnnnjnjjjjj
girisaksham3
 
Cloud Computing Virtualization and containers
Selvaraj Kesavan
 
Cloud computing | Cloud security | unit 2
dumhack90
 
virtualization.pptx
ssuser6e6eec
 
virtual machine.ppt
SushantShinde74
 
Virtualization (Distributed computing)
Sri Prasanna
 
AOS Lab 11: Virtualization
Zubair Nabi
 
CSC_406_5_Virtualization - Case Study, it's base on virtualization
dolandarc2
 
Ad

Recently uploaded (20)

PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Biography of Daniel Podor.pdf
Daniel Podor
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 

Hypervisors

  • 2. Motivation • In some situations, organizations need different computers but actually do not want it.
  • 3. Motivation • In some situations, organizations need different computers but actually do not want it. • E.g. a company has e-mail server, web server, FTP server, etc.
  • 4. Motivation • In some situations, organizations need different computers but actually do not want it. • E.g. a company has e-mail server, web server, FTP server, etc. • Due to reliability, use separate machines
  • 5. Motivation • In some situations, organizations need different computers but actually do not want it. • E.g. a company has e-mail server, web server, FTP server, etc. • Due to reliability, use separate machines Solution is virtualization
  • 6. Virtualization • Allows a single computer to run different virtual systems (Virtual Machines).
  • 7. Virtualization • Allows a single computer to run different virtual systems (Virtual Machines). • Abstracts the hardware of a single computer into different execution environments
  • 8. Virtualization • Allows a single computer to run different virtual systems (Virtual Machines). • Abstracts the hardware of a single computer into different execution environments • Creates illusion that each execution environment is running on its own private computer
  • 9. Virtualization • Allows a single computer to run different virtual systems (Virtual Machines). • Abstracts the hardware of a single computer into different execution environments • Creates illusion that each execution environment is running on its own private computer • Failure in one virtual machine do not affect other virtual machines
  • 10. Types of Hypervisors • Type 1 hypervisor
  • 11. Types of Hypervisors • Type 1 hypervisor Type 1 Hypervisor Hardware Windows Linux
  • 12. Types of Hypervisors • Type 1 hypervisor • Type 2 hypervisor Type 1 Hypervisor Hardware Windows Linux
  • 13. Types of Hypervisors • Type 1 hypervisor • Type 2 hypervisor Type 1 Hypervisor Hardware Windows Linux Type 2 Hypervisor Hardware Guest OS Host Operating System Other OS processes Type 1 Hypervisor Type 2 Hypervisor
  • 14. Requirements for Virtualization • CPU has some instructions which can only be executed in kernel mode e.g. perform I/O, changing MMU settings, etc.
  • 15. Requirements for Virtualization • CPU has some instructions which can only be executed in kernel mode e.g. perform I/O, changing MMU settings, etc. • These instructions are called sensitive instructions
  • 16. Requirements for Virtualization • CPU has some instructions which can only be executed in kernel mode e.g. perform I/O, changing MMU settings, etc. • These instructions are called sensitive instructions • Some instructions cause a trap if executed in user mode
  • 17. Requirements for Virtualization • CPU has some instructions which can only be executed in kernel mode e.g. perform I/O, changing MMU settings, etc. • These instructions are called sensitive instructions • Some instructions cause a trap if executed in user mode • These instructions are called privileged instructions
  • 18. Requirements for Virtualization • CPU has some instructions which can only be executed in kernel mode e.g. perform I/O, changing MMU settings, etc. • These instructions are called sensitive instructions • Some instructions cause a trap if executed in user mode • These instructions are called privileged instructions • A machine is virtualizable if sensitive instructions are subset of privileged instructions. Popek and Goldberg, Formal Requirements for Virtualizable Third Generation Architectures, Commun. Of ACM, 1974
  • 19. Different Techniques of Implementation • Binary translation • Paravirtualization • Hardware support
  • 21. Binary Translation …. …. Sensitive instruction …. …. Basic Block in code of guest OS …. …. VMware procedure …. ….
  • 22. Paravirtualization • Modifies guest OS source code, and directly executes hypervisor calls
  • 23. Hardware Support – Bird’s-eye View • In 2006, Intel introduced VT-x Hardware OS User Applications VMM
  • 24. Hardware Support – Bird’s-eye View • In 2006, Intel introduced VT-x Hardware OS User Applications VMM VMX Root Mode VMX Non-Root Mode
  • 25. VT-x Operating Modes • Set of processor operations called VMX operations
  • 26. VT-x Operating Modes • Set of processor operations called VMX operations • Two kinds of VMX operation
  • 27. VT-x Operating Modes • Set of processor operations called VMX operations • Two kinds of VMX operation • VMX root operation • Fully privileged, generally for VMM
  • 28. 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
  • 29. VM Entry and Exit • Two types of transitions
  • 30. 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
  • 31. 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
  • 32. VM Entry and Exit Guest 0 Guest 1 VMM VMXON VMXOFF VM EntryVM Exit VM Exit Picture: Copied from Intel Manual Sept 2014
  • 33. Virtual Machine Control Structure • Control Structures stored in memory
  • 34. Virtual Machine Control Structure • Control Structures stored in memory • One VMCS active per virtual processor at a time
  • 35. 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
  • 36. VM Exits in VMX Non-Root Operation • Some instructions cause VM-exit unconditionally • e.g. CPUID, INVD, XSETBV, INVEPT, VMCLEAR, VMLAUNCH, etc.
  • 37. 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.
  • 38. 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
  • 39. 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
  • 40. 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
  • 41. 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
  • 42. 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…
  • 43. References • A.S.Tanenbaum, Modern Operating Systems, 3rd Edition,2008 • Abraham Silberschatz, Peter B. Galvin, Greg Gagne, Operating System Concepts, 8th Edition, 2010 • Understanding Full Virtualization, Paravirtualization and Hardware-assist by VMware • Understanding Intel Virtualization Technology (Power point presentation) by Narendar B. Sahgal and Dion Rodgers • Intel 64 and IA-32 Architectures Software Developer’s Manual Volume 3

Editor's Notes

  • #21: Basic block is defined in compiler theory. It is a block of instructions which has single entry point and single exit point. By definition, they cannot have any instructions which can modify the program counter except at the end.
  • #22: Basic block is defined in compiler theory. It is a block of instructions which has single entry point and single exit point. By definition, they cannot have any instructions which can modify the program counter except at the end.