SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

Virtualization and cloud Computing
Virtualization and cloud ComputingVirtualization and cloud Computing
Virtualization and cloud ComputingRishikese MR
 
VIRTUALIZATION STRUCTURES TOOLS.docx
VIRTUALIZATION STRUCTURES TOOLS.docxVIRTUALIZATION STRUCTURES TOOLS.docx
VIRTUALIZATION STRUCTURES TOOLS.docxkumari36
 
5. IO virtualization
5. IO virtualization5. IO virtualization
5. IO virtualizationHwanju Kim
 
2. Distributed Systems Hardware & Software concepts
2. Distributed Systems Hardware & Software concepts2. Distributed Systems Hardware & Software concepts
2. Distributed Systems Hardware & Software conceptsPrajakta Rane
 
Eucalyptus, Nimbus & OpenNebula
Eucalyptus, Nimbus & OpenNebulaEucalyptus, Nimbus & OpenNebula
Eucalyptus, Nimbus & OpenNebulaAmar Myana
 
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
 
virtualization and hypervisors
virtualization and hypervisorsvirtualization and hypervisors
virtualization and hypervisorsGaurav Suri
 
Fault tolerance in distributed systems
Fault tolerance in distributed systemsFault tolerance in distributed systems
Fault tolerance in distributed systemssumitjain2013
 
cloud computing:Types of virtualization
cloud computing:Types of virtualizationcloud computing:Types of virtualization
cloud computing:Types of virtualizationDr.Neeraj Kumar Pandey
 
Storage Virtualization
Storage VirtualizationStorage Virtualization
Storage VirtualizationMehul Jariwala
 
Levels of Virtualization.docx
Levels of Virtualization.docxLevels of Virtualization.docx
Levels of Virtualization.docxkumari36
 
Virtualization in cloud
Virtualization in cloudVirtualization in cloud
Virtualization in cloudAshok Kumar
 
Xen Hypervisor.pptx
Xen Hypervisor.pptxXen Hypervisor.pptx
Xen Hypervisor.pptxRiyaBatool
 

Was ist angesagt? (20)

Virtualization and cloud Computing
Virtualization and cloud ComputingVirtualization and cloud Computing
Virtualization and cloud Computing
 
VIRTUALIZATION STRUCTURES TOOLS.docx
VIRTUALIZATION STRUCTURES TOOLS.docxVIRTUALIZATION STRUCTURES TOOLS.docx
VIRTUALIZATION STRUCTURES TOOLS.docx
 
5. IO virtualization
5. IO virtualization5. IO virtualization
5. IO virtualization
 
2. Distributed Systems Hardware & Software concepts
2. Distributed Systems Hardware & Software concepts2. Distributed Systems Hardware & Software concepts
2. Distributed Systems Hardware & Software concepts
 
Eucalyptus, Nimbus & OpenNebula
Eucalyptus, Nimbus & OpenNebulaEucalyptus, Nimbus & OpenNebula
Eucalyptus, Nimbus & OpenNebula
 
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 ...
 
virtualization and hypervisors
virtualization and hypervisorsvirtualization and hypervisors
virtualization and hypervisors
 
Hypervisor
HypervisorHypervisor
Hypervisor
 
Virtualization
VirtualizationVirtualization
Virtualization
 
Server virtualization
Server virtualizationServer virtualization
Server virtualization
 
Mobile 2.0
Mobile 2.0Mobile 2.0
Mobile 2.0
 
cloud computing: Vm migration
cloud computing: Vm migrationcloud computing: Vm migration
cloud computing: Vm migration
 
Fault tolerance in distributed systems
Fault tolerance in distributed systemsFault tolerance in distributed systems
Fault tolerance in distributed systems
 
cloud computing:Types of virtualization
cloud computing:Types of virtualizationcloud computing:Types of virtualization
cloud computing:Types of virtualization
 
Storage Virtualization
Storage VirtualizationStorage Virtualization
Storage Virtualization
 
Levels of Virtualization.docx
Levels of Virtualization.docxLevels of Virtualization.docx
Levels of Virtualization.docx
 
Virtualization in cloud
Virtualization in cloudVirtualization in cloud
Virtualization in cloud
 
Xen Hypervisor.pptx
Xen Hypervisor.pptxXen Hypervisor.pptx
Xen Hypervisor.pptx
 
Memory virtualization
Memory virtualizationMemory virtualization
Memory virtualization
 
VMware Presentation
VMware PresentationVMware Presentation
VMware Presentation
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Kürzlich hochgeladen

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 

Kürzlich hochgeladen (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
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...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 

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

Hinweis der Redaktion

  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