SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

CS8791 Unit 2 Cloud Enabling Technologies
CS8791 Unit 2 Cloud Enabling TechnologiesCS8791 Unit 2 Cloud Enabling Technologies
CS8791 Unit 2 Cloud Enabling Technologieskarthikajegadeesan
 
Hardware virtualization basic
Hardware virtualization basicHardware virtualization basic
Hardware virtualization basicSanoj Kumar
 
Cloud computing system models for distributed and cloud computing
Cloud computing system models for distributed and cloud computingCloud computing system models for distributed and cloud computing
Cloud computing system models for distributed and cloud computinghrmalik20
 
cloud computing:Types of virtualization
cloud computing:Types of virtualizationcloud computing:Types of virtualization
cloud computing:Types of virtualizationDr.Neeraj Kumar Pandey
 
Virtualization presentation
Virtualization presentationVirtualization presentation
Virtualization presentationMangesh Gunjal
 
What is Virtualization and its types & Techniques.What is hypervisor and its ...
What is Virtualization and its types & Techniques.What is hypervisor and its ...What is Virtualization and its types & Techniques.What is hypervisor and its ...
What is Virtualization and its types & Techniques.What is hypervisor and its ...Shashi soni
 
Eucalyptus, Nimbus & OpenNebula
Eucalyptus, Nimbus & OpenNebulaEucalyptus, Nimbus & OpenNebula
Eucalyptus, Nimbus & OpenNebulaAmar Myana
 
CS8791 Cloud Computing - Question Bank
CS8791 Cloud Computing - Question BankCS8791 Cloud Computing - Question Bank
CS8791 Cloud Computing - Question Bankpkaviya
 
Kvm virtualization platform
Kvm virtualization platformKvm virtualization platform
Kvm virtualization platformAhmad Hafeezi
 
CloudOpen 2012 OpenNebula talk
CloudOpen 2012 OpenNebula talkCloudOpen 2012 OpenNebula talk
CloudOpen 2012 OpenNebula talkOpenNebula Project
 
SaaS Challenges & Security Concerns
SaaS Challenges & Security ConcernsSaaS Challenges & Security Concerns
SaaS Challenges & Security ConcernsKannan Subbiah
 
What is Virtualization
What is VirtualizationWhat is Virtualization
What is VirtualizationIsrael Marcus
 
University Management System
University Management SystemUniversity Management System
University Management SystemChanHan Hy
 

Tendances (20)

CS8791 Unit 2 Cloud Enabling Technologies
CS8791 Unit 2 Cloud Enabling TechnologiesCS8791 Unit 2 Cloud Enabling Technologies
CS8791 Unit 2 Cloud Enabling Technologies
 
Virtual machine
Virtual machineVirtual machine
Virtual machine
 
Characteristics of cloud computing
Characteristics of cloud computingCharacteristics of cloud computing
Characteristics of cloud computing
 
Hardware virtualization basic
Hardware virtualization basicHardware virtualization basic
Hardware virtualization basic
 
What is Virtualization
What is VirtualizationWhat is Virtualization
What is Virtualization
 
Cloud computing system models for distributed and cloud computing
Cloud computing system models for distributed and cloud computingCloud computing system models for distributed and cloud computing
Cloud computing system models for distributed and cloud computing
 
Introduction to virtualization
Introduction to virtualizationIntroduction to virtualization
Introduction to virtualization
 
cloud computing:Types of virtualization
cloud computing:Types of virtualizationcloud computing:Types of virtualization
cloud computing:Types of virtualization
 
Virtualization presentation
Virtualization presentationVirtualization presentation
Virtualization presentation
 
What is Virtualization and its types & Techniques.What is hypervisor and its ...
What is Virtualization and its types & Techniques.What is hypervisor and its ...What is Virtualization and its types & Techniques.What is hypervisor and its ...
What is Virtualization and its types & Techniques.What is hypervisor and its ...
 
Eucalyptus, Nimbus & OpenNebula
Eucalyptus, Nimbus & OpenNebulaEucalyptus, Nimbus & OpenNebula
Eucalyptus, Nimbus & OpenNebula
 
Virtualization in cloud computing
Virtualization in cloud computingVirtualization in cloud computing
Virtualization in cloud computing
 
CS8791 Cloud Computing - Question Bank
CS8791 Cloud Computing - Question BankCS8791 Cloud Computing - Question Bank
CS8791 Cloud Computing - Question Bank
 
Kvm virtualization platform
Kvm virtualization platformKvm virtualization platform
Kvm virtualization platform
 
CloudOpen 2012 OpenNebula talk
CloudOpen 2012 OpenNebula talkCloudOpen 2012 OpenNebula talk
CloudOpen 2012 OpenNebula talk
 
SaaS Challenges & Security Concerns
SaaS Challenges & Security ConcernsSaaS Challenges & Security Concerns
SaaS Challenges & Security Concerns
 
What is Virtualization
What is VirtualizationWhat is Virtualization
What is Virtualization
 
University Management System
University Management SystemUniversity Management System
University Management System
 
Introduction to CloudStack
Introduction to CloudStack Introduction to CloudStack
Introduction to CloudStack
 
Virtualization basics
Virtualization basics Virtualization basics
Virtualization basics
 

Similaire à 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
 
Operating System---18 (Virtual Machines)
Operating System---18 (Virtual Machines)Operating System---18 (Virtual Machines)
Operating System---18 (Virtual Machines)NareenAsad
 
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
 

Similaire à 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
 
Operating System---18 (Virtual Machines)
Operating System---18 (Virtual Machines)Operating System---18 (Virtual Machines)
Operating System---18 (Virtual Machines)
 
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
 

Dernier

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 

Dernier (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 

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

Notes de l'éditeur

  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