SlideShare una empresa de Scribd logo
1 de 18
Hardware support for
    Virtualization
       Yoonje Choi
Origins
 Formalized by
  ‣    R. Goldberg. Architectural Principles for Virtual Computer Systems. Ph.D. thesis,
       Harvard Univer- sity, Cambridge, MA, 1972.

  ‣    G. Popek and R. Goldberg. Formal Requirements for Virtualizable 3rd
       Generation Architectures. Communications of the A.C.M., 17(7):412–421, 1974.
 By their standards,

  ‣    Virtual Machine : an efficient, isolated duplicate of the real machine.
  ‣    Virtual Machine Monitor is a piece of software which meets the following requirements
      •    Equivalent execution. Programs running in a virtual environment run identically to
           running natively, barring differences in resource availability and timing.
      •    Performance. A “statistically dominant” subset of instructions must be executed
           directly on the CPU.
      •    Safety. A VMM must completely control system resources.
Origins
 Instruction types
   ‣ Privileged
       • an instruction traps in unprivileged (user) mode but not in privileged
         (supervisor) mode.
   ‣ Sensitive
       ✓ Control sensitive
           • attempts to change the memory allocation or privilege mode
       ✓ Behavior sensitive
           • Location sensitive – execution behavior depends on location in memory
           • Mode sensitive – execution behavior depends on the privilege mode
   ‣ Innocuous – an instruction that is not sensitive

 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.

 The IA-32/x86 architecture is not virtualizable.
Full virtualization (direct execution)
      Exact hardware exposed to OS
      Efficient execution
      OS runs unchanged
      Requires a “virtualizable”
      architecture
      Example: VMWare ESX


Paravirtualization
     OS modified to execute under
     VMM
     Requires porting OS code
     Execution overhead
     Necessary for some (popular)
     architectures (e.g., x86)
     Examples: Xen
SIMULATE(d)
       sensitive



       innocuous                     innocuous
                       IDENT(ical)




Binary Translation
   Binary – input is machine-level code
   Dynamic – occurs at runtime
   On demand – code translated when needed for execution
   System level – makes no assumption about guest code
   Subsetting – translates from full instruction set to safe subset
   Adaptive – adjust code based on guest behavior to achieve efficiency
Intel® Virtualization Technology
What is Intel VT? (formerly known as Vanderpool)
 - Silicon level virtualization support to eliminate virtualization holes
 - Unmodified guest OSes can be executed.
 - VT-x : for the IA-32 architecture
 - VT-i : for the Itanium architecture
 - VT-d : for Directed I/O
 - cf. AMD-V (known as Pacifica)

Benefits with VT-x
  - Reduce size and complexity of VMM SW
  - Reduce the need for VMM intervention
  - Reduce the need for memory overhead (no sidetable…)
  - Avoids need to modify guest OSes allowing them to run directly on the HW
Intel VT-x Architecture
• Two new forms of CPU operation
   - VMX root operation – for use by a VMM
   - VMX non-root operation – similar to that
      of IA-32 without VT-x
    - Both forms of operation support all four
      privilege levels
    - Guest OS can run at its intended privilege
      level
• Two new transitions
    - VM entry – from VMX root operation to
      non-root operation
    - VM exit – from VMX non-root operation to
      root operation
• Under VMX non-root operation, Many
  instructions/events cause VM exits
Intel VT-x Architecture
• Two new forms of CPU operation
   - VMX root operation – for use by a VMM
   - VMX non-root operation – similar to that
      of IA-32 without VT-x
    - Both forms of operation support all four
      privilege levels
    - Guest OS can run at its intended privilege                 VM                 VM
      level
• Two new transitions                              Ring 3        Apps               Apps



    - VM entry – from VMX root operation to        Ring 0        OS                 OS

      non-root operation                               VM Exit          VM Entry

    - VM exit – from VMX non-root operation to     VMX
                                                                          VMM
      root operation                               Root

• Under VMX non-root operation, Many                         Intel® Virtualization Technology


  instructions/events cause VM exits                             Shared Physical Hardware
Virtual Machine Control Structure




 A new data structure.
 VMCS is created for each virtual CPU.
 VMCS includes guest-state area and host-
 state area
 At transition, corresponding state is loaded/
 saved VM Exiting events control
Virtual Machine Control Structure




 A new data structure.
 VMCS is created for each virtual CPU.
 VMCS includes guest-state area and host-
 state area
 At transition, corresponding state is loaded/
 saved VM Exiting events control
Virtual Machine Control Structure
                VM entry




 A new data structure.
 VMCS is created for each virtual CPU.
 VMCS includes guest-state area and host-
 state area
 At transition, corresponding state is loaded/
 saved VM Exiting events control
Virtual Machine Control Structure
                 VM exit




 A new data structure.
 VMCS is created for each virtual CPU.
 VMCS includes guest-state area and host-
 state area
 At transition, corresponding state is loaded/
 saved VM Exiting events control
Virtual Machine Control Structure




 A new data structure.
 VMCS is created for each virtual CPU.
 VMCS includes guest-state area and host-
 state area
 At transition, corresponding state is loaded/
 saved VM Exiting events control
VM exit/entry

Instructions, such as CPUID, MOV
from/to CR3, are intercepted as
VM exit.
Exceptions/faults, such as page
fault, are intercepted as VM exits,
and virtualized exceptions/faults
are injected on VM entry to guests.
External interrupts unrelated to
guests are intercepted as VM exits,
and virtualized interrupts are
injected on VM entry to the guests.
Performance
                                  100000                                                                                           10
                                                                                        Native                                                                             Software VMM
                                                                                Software VMM                                                                              Hardware VMM
                                                                               Hardware VMM
                                  10000
                                                                                                                                   8
 CPU cycles (smaller is better)




                                   1000                                                                                                      3.8GHz P4 672     2.66GHz Core 2 Duo




                                                                                                              Overhead (seconds)
                                                                                                            VM entry6                            2409                 937
                                                                                                            Page fault VM exit                   1931                1186
                                    100                                                                     VMCB read                             178                  52
                                                                                                            VMCB write
                                                                                                                    4                             171                  44
                                     10                                                                                     Table 1. Micro-architectural improvements (cycles).
                                                                                                                                   2
                                      1
                                                                                                           System calls were similar in frequency to PTE modifications.
                                                                                                       However, while the software VMM slows down system calls sub-
                                                                                                                     0
                                     0.1                                                               stantially, on an end-to-end basis system calls were not frequent
                                           syscall   in   cr8wr   callret   pgfault   divzero ptemod
                                                                                                       enough to offset the hardware VMM’s penalty for PTE ptemod transla
                                                                                                                           syscall in/out  cr8wr    callret pgfault
                                                                                                                                                                    modifica-
                                                                                                       tion (and I/O instructions), and the hardware VMM incurs consider-
                                           Figure 4. Virtualization nanobenchmarks.                    ably more Figure 5. Sources of virtualization overhead in workload.
                                                                                                                   total overhead than the software VMM in this an XP boot/h
                                                                                                           The cost of running the binary translator (vs. executing the
                                                                                                       translated code) is rarely significant; see again Figure 5. There are
tween the two VMMs, the hardware VMM inducing approximately                                            two reasons. First, the TC captures the working 35 cycles, about fou
4.4 times greater overhead than the software VMM. Still, this pro-                                            structions, completing the %cr8 write in set and continued
                                                                                                       execution amortizes away translation costs for long-running work-
                                                                                                              faster than native.
gram stresses many divergent paths through both VMMs, such as                                          loads. Second, the translator is quite fast because it does flow. anal-
system calls, context switching, creation of address spaces, modifi-                                               call/ret. BT slows down indirect control little We targ
                                                                                                       ysis (2300 cyclesby repeatedly calling a subroutine. Since kcy- ha
                                                                                                              overhead per x86 instruction, compared with 100-200 the
cation of traced page table entries, and injection of page faults.                                     cles per Java bytecode for some optimizing JITs [1]). High trans- the
                                                                                                              VMM executes calls and returns without modification,
                                                                                                       lator throughput ensures goodboth execute the call/return pair in 11
                                                                                                              ware VMM and native performance even for a worst-case
6.3 Virtualization nanobenchmarks                                                                      workload like boot/halt that mostly executes cold code.
Conclusion
• While the new hardware removes the need
  for BT and simplifies VMM design, it rarely
  improves performance.
• Hardware overheads will shrink over time
  as technology matures.
References
•   Paul Barham, Boris Dragovic, Keir Fraser, Steven Hand, Tim Harris, Alex
    Ho, Rolf Neugebauer, Ian Pratt, and Andrew Warfield. Xen and the art of
    virtualization. In Proceedings of the ACM Symposium on Operating Systems
    Principles, October 2003.
•   Jacob Faber Kloster, Jesper Kristensen, and Arne Mejlholm. Efficient
    memory sharing in the xen virtual machine monitor. http://www.cs.aau.dk/
    library/cgi-bin/detail.cgi?id=1136884892, January 2006.
•   Gil Neiger, Amy Santoni, Felix Leung, Dion Rodgers, Rich Uhlig. Intel
    Virtualization Technology:Hardware Support for Efficient Processor
    Virtualization. Intel Technology Journal Volume 10, Issue 3, 2006
•   J. Fisher-Ogden. Hardware support for efficient virtualization. http://
    cseweb.ucsd.edu/~jfisherogden/hardwareVirt.pdf, 2006.
•   http://courses.cs.vt.edu/cs5204/fall09-kafura/
Definitions
Virtualization
 ‣ A layer mapping its visible interface and resources onto the interface and
      resources of the underlying layer or system on which it is implemented
 ‣ Purposes
     •     Abstraction – to simplify the use of the underlying resource (e.g., by
           removing details of the resource’s structure)
     •     Replication – to create multiple instances of the resource (e.g., to
           simplify management or allocation)
     •     Isolation – to separate the uses which clients make of the underlying
           resources (e.g., to improve security)
Virtual Machine Monitor (VMM)
 ‣    A virtualization system that partitions a single physical “machine” into
      multiple virtual machines.
Terminology
 ‣    Host – the machine and/or software on which the VMM is implemented
 ‣    Guest – the OS which executes under the control of the VMM

Más contenido relacionado

La actualidad más candente

Introduction to Aneka, Aneka Model is explained
Introduction to Aneka, Aneka Model is explainedIntroduction to Aneka, Aneka Model is explained
Introduction to Aneka, Aneka Model is explainedDr Neelesh Jain
 
Virtualization in cloud computing ppt
Virtualization in cloud computing pptVirtualization in cloud computing ppt
Virtualization in cloud computing pptMehul Patel
 
Lecture5 virtualization
Lecture5 virtualizationLecture5 virtualization
Lecture5 virtualizationhktripathy
 
Mobile Information Architecture
Mobile Information ArchitectureMobile Information Architecture
Mobile Information ArchitectureLifna C.S
 
Virtual Machine Concept
Virtual Machine ConceptVirtual Machine Concept
Virtual Machine Conceptfatimaanique1
 
Virtual Machine Migration & Hypervisors
Virtual Machine Migration & HypervisorsVirtual Machine Migration & Hypervisors
Virtual Machine Migration & HypervisorsArun Shukla
 
cloud virtualization technology
 cloud virtualization technology  cloud virtualization technology
cloud virtualization technology Ravindra Dastikop
 
Virtualization
VirtualizationVirtualization
VirtualizationBirju Tank
 

La actualidad más candente (20)

Introduction to Aneka, Aneka Model is explained
Introduction to Aneka, Aneka Model is explainedIntroduction to Aneka, Aneka Model is explained
Introduction to Aneka, Aneka Model is explained
 
Virtualization in cloud computing ppt
Virtualization in cloud computing pptVirtualization in cloud computing ppt
Virtualization in cloud computing ppt
 
Virtualization
VirtualizationVirtualization
Virtualization
 
Lecture5 virtualization
Lecture5 virtualizationLecture5 virtualization
Lecture5 virtualization
 
Mobile 2.0
Mobile 2.0Mobile 2.0
Mobile 2.0
 
Virtual Machine
Virtual MachineVirtual Machine
Virtual Machine
 
Task programming
Task programmingTask programming
Task programming
 
Mobile Information Architecture
Mobile Information ArchitectureMobile Information Architecture
Mobile Information Architecture
 
Virtualization.ppt
Virtualization.pptVirtualization.ppt
Virtualization.ppt
 
Virtual Machine Concept
Virtual Machine ConceptVirtual Machine Concept
Virtual Machine Concept
 
Virtualization
Virtualization Virtualization
Virtualization
 
Virtual Machine Migration & Hypervisors
Virtual Machine Migration & HypervisorsVirtual Machine Migration & Hypervisors
Virtual Machine Migration & Hypervisors
 
cloud virtualization technology
 cloud virtualization technology  cloud virtualization technology
cloud virtualization technology
 
Server virtualization
Server virtualizationServer virtualization
Server virtualization
 
Unit v
Unit vUnit v
Unit v
 
Virtualization
VirtualizationVirtualization
Virtualization
 
Virtualization
VirtualizationVirtualization
Virtualization
 
Virtualization in cloud computing
Virtualization in cloud computingVirtualization in cloud computing
Virtualization in cloud computing
 
Microsoft Hyper-V
Microsoft Hyper-VMicrosoft Hyper-V
Microsoft Hyper-V
 
What is Virtualization
What is VirtualizationWhat is Virtualization
What is Virtualization
 

Similar a Hardware supports for Virtualization

Cooperative VM Migration for a virtualized HPC Cluster with VMM-bypass I/O de...
Cooperative VM Migration for a virtualized HPC Cluster with VMM-bypass I/O de...Cooperative VM Migration for a virtualized HPC Cluster with VMM-bypass I/O de...
Cooperative VM Migration for a virtualized HPC Cluster with VMM-bypass I/O de...Ryousei Takano
 
2014.08.30 Virtual Machine Threat 세미나
2014.08.30 Virtual Machine Threat 세미나2014.08.30 Virtual Machine Threat 세미나
2014.08.30 Virtual Machine Threat 세미나용환 노
 
Virtualization Primer for Java Developers
Virtualization Primer for Java DevelopersVirtualization Primer for Java Developers
Virtualization Primer for Java DevelopersRichard McDougall
 
Virtualization Technology Overview
Virtualization Technology OverviewVirtualization Technology Overview
Virtualization Technology OverviewOpenCity Community
 
Realtime scheduling for virtual machines in SKT
Realtime scheduling for virtual machines in SKTRealtime scheduling for virtual machines in SKT
Realtime scheduling for virtual machines in SKTThe Linux Foundation
 
Chapter 5 – Cloud Resource Virtua.docx
Chapter 5 – Cloud Resource                        Virtua.docxChapter 5 – Cloud Resource                        Virtua.docx
Chapter 5 – Cloud Resource Virtua.docxmadlynplamondon
 
Chapter 5 – Cloud Resource Virtua.docx
Chapter 5 – Cloud Resource                        Virtua.docxChapter 5 – Cloud Resource                        Virtua.docx
Chapter 5 – Cloud Resource Virtua.docxgertrudebellgrove
 
The Architecture Of V Mware Es Xi
The Architecture Of V Mware Es XiThe Architecture Of V Mware Es Xi
The Architecture Of V Mware Es XiRishi Sharma
 
Windows Azure Interoperability
Windows Azure InteroperabilityWindows Azure Interoperability
Windows Azure InteroperabilityMihai Dan Nadas
 
Hardware support for efficient virtualization
Hardware support for efficient virtualizationHardware support for efficient virtualization
Hardware support for efficient virtualizationLennox Wu
 
Vmware admin interview questions
Vmware admin interview questionsVmware admin interview questions
Vmware admin interview questionsRitesh Rushiya
 
V mware admin interview questions
V mware admin interview questionsV mware admin interview questions
V mware admin interview questionsPraveen Raut
 
VMworld 2013: How to Exchange Status Message Between Guest and Host Using RPC
VMworld 2013: How to Exchange Status Message Between Guest and Host Using RPC VMworld 2013: How to Exchange Status Message Between Guest and Host Using RPC
VMworld 2013: How to Exchange Status Message Between Guest and Host Using RPC VMworld
 
CloudComputing_UNIT 2.pdf
CloudComputing_UNIT 2.pdfCloudComputing_UNIT 2.pdf
CloudComputing_UNIT 2.pdfkhan593595
 

Similar a Hardware supports for Virtualization (20)

Cooperative VM Migration for a virtualized HPC Cluster with VMM-bypass I/O de...
Cooperative VM Migration for a virtualized HPC Cluster with VMM-bypass I/O de...Cooperative VM Migration for a virtualized HPC Cluster with VMM-bypass I/O de...
Cooperative VM Migration for a virtualized HPC Cluster with VMM-bypass I/O de...
 
2014.08.30 Virtual Machine Threat 세미나
2014.08.30 Virtual Machine Threat 세미나2014.08.30 Virtual Machine Threat 세미나
2014.08.30 Virtual Machine Threat 세미나
 
Virtualization Primer for Java Developers
Virtualization Primer for Java DevelopersVirtualization Primer for Java Developers
Virtualization Primer for Java Developers
 
Intel update
Intel updateIntel update
Intel update
 
Virtualization Technology Overview
Virtualization Technology OverviewVirtualization Technology Overview
Virtualization Technology Overview
 
Usenix Invited Talk
Usenix Invited TalkUsenix Invited Talk
Usenix Invited Talk
 
Realtime scheduling for virtual machines in SKT
Realtime scheduling for virtual machines in SKTRealtime scheduling for virtual machines in SKT
Realtime scheduling for virtual machines in SKT
 
ch16.ppt
ch16.pptch16.ppt
ch16.ppt
 
Ss(virtual machine)
Ss(virtual machine)Ss(virtual machine)
Ss(virtual machine)
 
17-virtualization.pptx
17-virtualization.pptx17-virtualization.pptx
17-virtualization.pptx
 
Chapter 5 – Cloud Resource Virtua.docx
Chapter 5 – Cloud Resource                        Virtua.docxChapter 5 – Cloud Resource                        Virtua.docx
Chapter 5 – Cloud Resource Virtua.docx
 
Chapter 5 – Cloud Resource Virtua.docx
Chapter 5 – Cloud Resource                        Virtua.docxChapter 5 – Cloud Resource                        Virtua.docx
Chapter 5 – Cloud Resource Virtua.docx
 
The Architecture Of V Mware Es Xi
The Architecture Of V Mware Es XiThe Architecture Of V Mware Es Xi
The Architecture Of V Mware Es Xi
 
Windows Azure Interoperability
Windows Azure InteroperabilityWindows Azure Interoperability
Windows Azure Interoperability
 
Hardware support for efficient virtualization
Hardware support for efficient virtualizationHardware support for efficient virtualization
Hardware support for efficient virtualization
 
Vmware admin interview questions
Vmware admin interview questionsVmware admin interview questions
Vmware admin interview questions
 
V mware admin interview questions
V mware admin interview questionsV mware admin interview questions
V mware admin interview questions
 
VMworld 2013: How to Exchange Status Message Between Guest and Host Using RPC
VMworld 2013: How to Exchange Status Message Between Guest and Host Using RPC VMworld 2013: How to Exchange Status Message Between Guest and Host Using RPC
VMworld 2013: How to Exchange Status Message Between Guest and Host Using RPC
 
Vm ware interview questions
Vm ware interview questionsVm ware interview questions
Vm ware interview questions
 
CloudComputing_UNIT 2.pdf
CloudComputing_UNIT 2.pdfCloudComputing_UNIT 2.pdf
CloudComputing_UNIT 2.pdf
 

Último

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Último (20)

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

Hardware supports for Virtualization

  • 1. Hardware support for Virtualization Yoonje Choi
  • 2. Origins Formalized by ‣ R. Goldberg. Architectural Principles for Virtual Computer Systems. Ph.D. thesis, Harvard Univer- sity, Cambridge, MA, 1972. ‣ G. Popek and R. Goldberg. Formal Requirements for Virtualizable 3rd Generation Architectures. Communications of the A.C.M., 17(7):412–421, 1974. By their standards, ‣ Virtual Machine : an efficient, isolated duplicate of the real machine. ‣ Virtual Machine Monitor is a piece of software which meets the following requirements • Equivalent execution. Programs running in a virtual environment run identically to running natively, barring differences in resource availability and timing. • Performance. A “statistically dominant” subset of instructions must be executed directly on the CPU. • Safety. A VMM must completely control system resources.
  • 3. Origins Instruction types ‣ Privileged • an instruction traps in unprivileged (user) mode but not in privileged (supervisor) mode. ‣ Sensitive ✓ Control sensitive • attempts to change the memory allocation or privilege mode ✓ Behavior sensitive • Location sensitive – execution behavior depends on location in memory • Mode sensitive – execution behavior depends on the privilege mode ‣ Innocuous – an instruction that is not sensitive 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. The IA-32/x86 architecture is not virtualizable.
  • 4. Full virtualization (direct execution) Exact hardware exposed to OS Efficient execution OS runs unchanged Requires a “virtualizable” architecture Example: VMWare ESX Paravirtualization OS modified to execute under VMM Requires porting OS code Execution overhead Necessary for some (popular) architectures (e.g., x86) Examples: Xen
  • 5. SIMULATE(d) sensitive innocuous innocuous IDENT(ical) Binary Translation Binary – input is machine-level code Dynamic – occurs at runtime On demand – code translated when needed for execution System level – makes no assumption about guest code Subsetting – translates from full instruction set to safe subset Adaptive – adjust code based on guest behavior to achieve efficiency
  • 6. Intel® Virtualization Technology What is Intel VT? (formerly known as Vanderpool) - Silicon level virtualization support to eliminate virtualization holes - Unmodified guest OSes can be executed. - VT-x : for the IA-32 architecture - VT-i : for the Itanium architecture - VT-d : for Directed I/O - cf. AMD-V (known as Pacifica) Benefits with VT-x - Reduce size and complexity of VMM SW - Reduce the need for VMM intervention - Reduce the need for memory overhead (no sidetable…) - Avoids need to modify guest OSes allowing them to run directly on the HW
  • 7. Intel VT-x Architecture • Two new forms of CPU operation - VMX root operation – for use by a VMM - VMX non-root operation – similar to that of IA-32 without VT-x - Both forms of operation support all four privilege levels - Guest OS can run at its intended privilege level • Two new transitions - VM entry – from VMX root operation to non-root operation - VM exit – from VMX non-root operation to root operation • Under VMX non-root operation, Many instructions/events cause VM exits
  • 8. Intel VT-x Architecture • Two new forms of CPU operation - VMX root operation – for use by a VMM - VMX non-root operation – similar to that of IA-32 without VT-x - Both forms of operation support all four privilege levels - Guest OS can run at its intended privilege VM VM level • Two new transitions Ring 3 Apps Apps - VM entry – from VMX root operation to Ring 0 OS OS non-root operation VM Exit VM Entry - VM exit – from VMX non-root operation to VMX VMM root operation Root • Under VMX non-root operation, Many Intel® Virtualization Technology instructions/events cause VM exits Shared Physical Hardware
  • 9. Virtual Machine Control Structure A new data structure. VMCS is created for each virtual CPU. VMCS includes guest-state area and host- state area At transition, corresponding state is loaded/ saved VM Exiting events control
  • 10. Virtual Machine Control Structure A new data structure. VMCS is created for each virtual CPU. VMCS includes guest-state area and host- state area At transition, corresponding state is loaded/ saved VM Exiting events control
  • 11. Virtual Machine Control Structure VM entry A new data structure. VMCS is created for each virtual CPU. VMCS includes guest-state area and host- state area At transition, corresponding state is loaded/ saved VM Exiting events control
  • 12. Virtual Machine Control Structure VM exit A new data structure. VMCS is created for each virtual CPU. VMCS includes guest-state area and host- state area At transition, corresponding state is loaded/ saved VM Exiting events control
  • 13. Virtual Machine Control Structure A new data structure. VMCS is created for each virtual CPU. VMCS includes guest-state area and host- state area At transition, corresponding state is loaded/ saved VM Exiting events control
  • 14. VM exit/entry Instructions, such as CPUID, MOV from/to CR3, are intercepted as VM exit. Exceptions/faults, such as page fault, are intercepted as VM exits, and virtualized exceptions/faults are injected on VM entry to guests. External interrupts unrelated to guests are intercepted as VM exits, and virtualized interrupts are injected on VM entry to the guests.
  • 15. Performance 100000 10 Native Software VMM Software VMM Hardware VMM Hardware VMM 10000 8 CPU cycles (smaller is better) 1000 3.8GHz P4 672 2.66GHz Core 2 Duo Overhead (seconds) VM entry6 2409 937 Page fault VM exit 1931 1186 100 VMCB read 178 52 VMCB write 4 171 44 10 Table 1. Micro-architectural improvements (cycles). 2 1 System calls were similar in frequency to PTE modifications. However, while the software VMM slows down system calls sub- 0 0.1 stantially, on an end-to-end basis system calls were not frequent syscall in cr8wr callret pgfault divzero ptemod enough to offset the hardware VMM’s penalty for PTE ptemod transla syscall in/out cr8wr callret pgfault modifica- tion (and I/O instructions), and the hardware VMM incurs consider- Figure 4. Virtualization nanobenchmarks. ably more Figure 5. Sources of virtualization overhead in workload. total overhead than the software VMM in this an XP boot/h The cost of running the binary translator (vs. executing the translated code) is rarely significant; see again Figure 5. There are tween the two VMMs, the hardware VMM inducing approximately two reasons. First, the TC captures the working 35 cycles, about fou 4.4 times greater overhead than the software VMM. Still, this pro- structions, completing the %cr8 write in set and continued execution amortizes away translation costs for long-running work- faster than native. gram stresses many divergent paths through both VMMs, such as loads. Second, the translator is quite fast because it does flow. anal- system calls, context switching, creation of address spaces, modifi- call/ret. BT slows down indirect control little We targ ysis (2300 cyclesby repeatedly calling a subroutine. Since kcy- ha overhead per x86 instruction, compared with 100-200 the cation of traced page table entries, and injection of page faults. cles per Java bytecode for some optimizing JITs [1]). High trans- the VMM executes calls and returns without modification, lator throughput ensures goodboth execute the call/return pair in 11 ware VMM and native performance even for a worst-case 6.3 Virtualization nanobenchmarks workload like boot/halt that mostly executes cold code.
  • 16. Conclusion • While the new hardware removes the need for BT and simplifies VMM design, it rarely improves performance. • Hardware overheads will shrink over time as technology matures.
  • 17. References • Paul Barham, Boris Dragovic, Keir Fraser, Steven Hand, Tim Harris, Alex Ho, Rolf Neugebauer, Ian Pratt, and Andrew Warfield. Xen and the art of virtualization. In Proceedings of the ACM Symposium on Operating Systems Principles, October 2003. • Jacob Faber Kloster, Jesper Kristensen, and Arne Mejlholm. Efficient memory sharing in the xen virtual machine monitor. http://www.cs.aau.dk/ library/cgi-bin/detail.cgi?id=1136884892, January 2006. • Gil Neiger, Amy Santoni, Felix Leung, Dion Rodgers, Rich Uhlig. Intel Virtualization Technology:Hardware Support for Efficient Processor Virtualization. Intel Technology Journal Volume 10, Issue 3, 2006 • J. Fisher-Ogden. Hardware support for efficient virtualization. http:// cseweb.ucsd.edu/~jfisherogden/hardwareVirt.pdf, 2006. • http://courses.cs.vt.edu/cs5204/fall09-kafura/
  • 18. Definitions Virtualization ‣ A layer mapping its visible interface and resources onto the interface and resources of the underlying layer or system on which it is implemented ‣ Purposes • Abstraction – to simplify the use of the underlying resource (e.g., by removing details of the resource’s structure) • Replication – to create multiple instances of the resource (e.g., to simplify management or allocation) • Isolation – to separate the uses which clients make of the underlying resources (e.g., to improve security) Virtual Machine Monitor (VMM) ‣ A virtualization system that partitions a single physical “machine” into multiple virtual machines. Terminology ‣ Host – the machine and/or software on which the VMM is implemented ‣ Guest – the OS which executes under the control of the VMM

Notas del editor

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n