• No results found

VMware and CPU Virtualization Technology. Jack Lo Sr. Director, R&D

N/A
N/A
Protected

Academic year: 2021

Share "VMware and CPU Virtualization Technology. Jack Lo Sr. Director, R&D"

Copied!
34
0
0

Loading.... (view fulltext now)

Full text

(1)

VMware and CPU

Virtualization Technology

Jack Lo

Sr. Director, R&D

(2)

This presentation may contain VMware confidential information.

Copyright © 2005 VMware, Inc. All rights reserved. All other marks and names mentioned herein may be trademarks of their respective

companies.

(3)

ƒ Emerging technologies that impact CPU virtualization

ƒ Hardware assist (VT-x/Pacifica)

ƒ 64-bit computing

ƒ OS assist (paravirtualization)

ƒ Today’s talk:

ƒ Share our perspective on emerging technologies

Overview

(4)

Agenda

ƒ CPU virtualization technology overview

ƒ Virtualizing the x86 architecture

ƒ Trend No. 1: Hardware assist

ƒ VT-x and Pacifica

ƒ Trend No. 2: 64-bit computing

ƒ Benefits of 64-bit architecture

ƒ 64-bit guest support

ƒ Trend No. 3: OS assist

ƒ VMware and paravirtualization

(5)

Full Virtualization Software Stack

Hardware

VM VM VM

VMM VMM

VMM VMM

ESX Server Service

Console

VMX VMX

VMX VMX

Device Drivers I/O Stack

SDK / VirtualCenter Agent

Third-party Solutions

Distributed Services

DRS VMotion

DAS Provisioning

Backup

VirtualCenter

Management and Distributed Virtualization

Services

Virtual Machine Monitor

Device Drivers VMkernel Hardware Interface Third-

Party Agents

Storage Stack Network Stack Distributed

Virtual Machine File System

Virtual NIC and Switch Resource

Management CPU Scheduling Memory Scheduling

Storage Bandwidth Network Bandwidth

Enterprise Class

Virtualization Functionality

VM

(6)

Today’s Focus

Hardware

VM VM

VM VM

VMM VMM

VMM VMM

ESX Server Service

Console

VMX VMX

VMX VMX

Device Drivers I/O Stack

SDK / VirtualCenter Agent

Third-party Solutions

Distributed Services

DRS VMotion

DAS Provisioning

Backup

VirtualCenter

Management and Distributed Virtualization

Services

Virtual Machine Monitor

Device Drivers VMkernel Hardware Interface Third-

Party Agents

Storage Stack Network Stack Distributed

VM File System

Virtual NIC &

Switch Resource

Management CPU Scheduling Memory Scheduling

Storage Bandwidth Network Bandwidth

Enterprise Class

Virtualization Functionality

(7)

Virtualization SW Terminology

ƒ Virtual Machine Monitor (VMM)

ƒ SW component that implements virtual machine hardware abstraction

ƒ Responsible for running the guest OS

ƒ Hypervisor

ƒ Software responsible for hosting and managing virtual machines

ƒ Run directly on the hardware

ƒ Functionality varies greatly with architecture and implementation

Hypervisor

VMM VMM VMM

Base Functionality (e.g. scheduling)

Enhanced Functionality

(8)

CPU Virtualization

ƒ Three components to classical virtualization techniques

ƒ Many virtualization technologies focus on handling privileged instructions

Memory partitioning and

allocation of physical memory Memory virtualization

Routing I/O requests between virtual devices and physical hardware

Device and I/O virtualization

De-privileging or ring

compression to handle privileged instructions

Privileged instruction virtualization

(9)

Handling Privileged Instructions

ƒ In traditional systems

ƒOS runs in privileged mode

ƒOS “owns” the hardware

ƒApplication code has less privilege

ƒ VMM needs highest privilege level for isolation and performance

ƒ Traditional VMM relies on “ring compression” or “de-privileging”

ƒRun privileged guest OS code at user-level

ƒPrivileged instructions trap, and emulated by VMM

Ring 3 Ring 0 Guest OS

Apps

Ring 3

Ring 0 Guest OS

Apps

VMM

(10)

Virtualizing x86 Architecture

ƒ De-privileging not possible with x86!

ƒ Some privileged instructions have different semantics at user-level: “non-virtualizable instructions”

ƒ VMware uses direct execution and binary translation (BT)

ƒ BT for handling privileged code

ƒ Direct execution of user-level code for performance

ƒ Any unmodified x86 OS can run in virtual

machine

(11)

Protecting the VMM

ƒ Need to protect VMM and ensure isolation

ƒ Protect virtual machines from each other

ƒ Protect VMM from virtual machines

ƒ VMware relies on segmentation hardware to protect the VMM

ƒ VMM lives at top of guest address space

ƒ Segment limit checks catch writes to VMM area

0 4GB

VMM

(12)

Agenda

ƒ CPU virtualization technology overview

ƒ Virtualizing the x86 architecture

ƒ Trend No. 1: Hardware assist

ƒ Trend No. 2: 64-bit computing

ƒ Trend No. 3: OS assist

(13)

Trend No. 1: Hardware Assist

ƒ CPU vendors are embracing virtualization

ƒIntel Virtualization Technology (VT-x)

ƒAMD Pacifica

ƒ These CPU technologies are a series of enhancements to aid virtualization SW

ƒInitially focused on handling non-virtualizable instructions

ƒUse a trap-and-emulate model

ƒAlternative to using binary translation

ƒ But hardware assist does not eliminate

need for VMware technology

(14)

VT-x/Pacifica Overview

ƒ Key feature is new CPU

execution mode (root mode)

ƒ VMM executes in root mode

ƒ Allows x86 virtualization without binary translation or paravirtualization

ƒ Guest state stored in Virtual Machine Control

Structures (VT-x) or Virtual Machine Control Block

(Pacifica)

Root modeNon-root mode

Ring 3

Ring 0

VM exit

VM enter Guest OS

Apps

Virtual Machine Monitor (VMM) Guest OS

Apps

(15)

Limitations of Hardware Assist

ƒ Initial VT-x/Pacifica hardware does not include all components of CPU virtualization solution

ƒ VT-x requires small emulator for real mode code

ƒ Memory virtualization support lacking

ƒ Not in VT-x; implementation-dependent for Pacifica

ƒ Memory virtualization is key to performance!

ƒ No device virtualization support

Hardware Assist

No Memory virtualization

No Device and I/O virtualization

Yes Privileged instructions

(16)

Future of Hardware Assist

ƒ CPU vendors will add more hardware capabilities in future

ƒ Memory virtualization (Nested paging, EPT)

ƒ VMware software will evolve to incorporate support for these new technologies

ƒ Adopt technologies as they enable new capabilities

Hardware Solution

Extended Page

Tables/Nested Paging Memory virtualization

Intelligent Devices Devices and I/O

VT-x, Pacifica Privileged

instructions

(17)

Trend No. 2: 64-bit Computing

ƒ Progression of the x86 architecture

ƒ 16-bit: 8086/8088 (1978)

ƒ 32-bit: 80386 (1985)

ƒ 64-bit: x86-64 (2003): a.k.a. AMD64, x64

ƒ x86-64 architecture brings 64-bit computing to industry-standard systems

ƒ Provides compatibility mode to run 32-bit x86 applications

ƒ Extensions to x86 architecture

(18)

64-bit Transition Has Already Begun

ƒ Apps exhausting limits of 32-bit address space

ƒ Consuming 1 bit of address space / year

ƒ Databases, Java app servers, other threaded applications

ƒ Most new CPUs are 64-bit enabled

ƒ AMD64, EM64T

ƒ Major OSes have been ported

ƒ Windows, Linux, Solaris 10, etc.

ƒ Applications are being ported

ƒ Databases, app servers, development tools,

games, etc.

(19)

Virtualization And x86-64

ƒ Potential questions about 64-bit transition

ƒ Do my apps run in 64-bit OS?

ƒ Have drivers been ported?

ƒ Are the 64-bit OSes robust?

ƒ The solution: virtualization!

ƒ Great aid for 64-bit transition

ƒ Easy way to evaluate new OSes

ƒ Can run 64-bit guest OSes

on 32-bit host OS on 64-bit hardware)!

64-bit Hardware

VMM VMM64 32-

bit VM

64- bit VM

Applications

32-bit or 64-bit Host OS

(20)

Challenges of Virtualizing x86-64

ƒ Initial AMD64 architecture did not include segmentation in 64-bit mode

ƒ Segmentation also missing from EM64T

How do we protect the VMM?

ƒ 64-bit guest support requires additional hardware assistance

ƒ Segment limit checks available in 64-bit mode on newer AMD processors

ƒ VT-x can be used to protect the VMM on EM64T

ƒ Requires trap-and-emulate approach instead of BT

(21)

Flexible VMM Architecture

ƒ Flexible “multi-mode” VMM architecture

ƒ Separate VMM per virtual machine

ƒ 32-bit: BT VMM

ƒ 64-bit: BT or VT/Pacifica VMM depending on

hardware

ƒ Select mode that

achieves best workload- specific performance

ƒ Same VMM architecture for ESX Server, GSX Server, Workstation and ACE

VM VM

VM VM

BT VMM32

BT/VT VMM64 BT/VT

VMM64 BT

VMM32

. . . . . .

(22)

64-bit Guests And WS 5.5

ƒ Workstation 5.5 enables 64-bit guests

ƒ Currently in beta

ƒ Simultaneously run 32-bit and 64-bit guests

ƒ Runs on 32-bit and 64-bit host OSes

64-bit Hardware

VMM VMM64 32-

bit VM

64- bit VM

Applications

32-bit or 64-bit Host OS

(23)

Requirements For 64-bit Guests

ƒ Newer hardware required for 64-bit guest support

ƒ AMD Opteron Rev. E or later

ƒ AMD Athlon64 Rev. D or later

ƒ Intel VT-enabled processor

ƒ How to determine that you have a 64-bit capable system?

ƒ Workstation 5.5 will automatically check to see if your CPU meets the requirements

ƒ CPU check utility also available for download on WS5.5 beta web page

ƒ http://www.vmware.com/products/beta/ws/

(24)

Trend No. 3: OS Assist

ƒ Three alternatives for handling non-virtualizable instructions

ƒ Binary translation

ƒ Hardware assist

ƒ OS assist or paravirtualization

Average Good

Performance

Average High

VMM sophistication

Excellent Excellent

Compatibility

Para-

virtualization Hardware

Assist Binary

Translation

(25)

Paravirtualization

ƒ Paravirtualization can address same problem as hardware assist

Average Good

Performance

Average High

VMM sophistication

Excellent Excellent

Compatibility

Para-

virtualization Hardware

Assist Binary

Translation

ƒ Modify the guest OS to remove non-virtualizable instructions

ƒ Export a simpler architecture to OS

ƒ Cannot support unmodified OSes (e.g. Windows 2000/XP)

Poor

ƒ Paravirtualization not limited to CPU virtualization

ƒ Higher performance possible

Excellent

ƒ Relatively easy to add paravirtualization support:

very difficult to add binary translation

Average

(26)

Paravirtualization Challenges

ƒ XenoLinux paravirtualization approach unsuitable for enterprise use

ƒ Relies on separate kernel for native and in virtual machine

ƒ Guest OS and hypervisor tightly coupled

ƒ Tight coupling inhibits compatibility

ƒ Changes to the guest OS are invasive

ƒ Inhibits maintainability and supportability

ƒ Guest kernel must be recompiled when hypervisor is updated

ƒ How can we deliver paravirtualization for

enterprise customers?

(27)

VMI Paravirtualization API

ƒ VMware proposal: Virtual machine Interface API

ƒ VMI provides maintainability & stability

ƒ API supports low-level and higher-level interfaces

ƒ Allows same kernel to run natively and in a paravirtualized virtual machine: “transparent paravirtualization”

ƒ Allows for replacement of hypervisors without a guest recompile

ƒ Preserve key virtualization functionality: page sharing, VMotion, etc.

ƒ We are gathering feedback on the API from many kernel developers and OSVs

ƒ http://www.vmware.com/vmi

ƒ http://www.vmware.com/standards/hypercalls.html

(28)

VMI Paravirtualization

ƒ VMI approach to paravirtualization improves compatibility

ƒ API need not compromise performance compared to invasive paravirtualization

Excellent Average

Good Performance

Average Average

High VMM sophistication

Good Excellent

Excellent Compatibility

Para-

virtualization Hardware

Assist Binary

Translation

(29)

VMware Paravirtualization Performance

Performance Relative to Native Bigger is Better

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

compile Dbench/1client [cpu microbenchmark]

Dbench/1client HIGHMEM [cpu microbenchmark]

Database kernel

Xen2 Xen3-devel VMware-para

(30)

VMware And Paravirtualization

Hardware

Distributed VM File System

Device Drivers Storage

Stack

ESX Server

Resource Management

VM

VMM32

VM

VMM64 Para-

VMM

VM

Virtual NIC &

Switch

Network Stack

VM

VMM64

ƒ VMware will support paravirtualized Linux OSes

ƒ Another guest type when such OS’s commercially available

ƒ Flexible architecture

ƒ Use most efficient technique for the guest OS type

ƒ BT, VT/Pacifica, or paravirtualization

(31)

Summary

ƒ 64-bit transition happening now

ƒ Virtualization can assist with transition

ƒ 64-bit guests supported in WS5.5

ƒ VMware provides flexible architecture to support emerging virtualization technologies

ƒ Multi-mode VMM utilizes binary translation, hardware assist and paravirtualization

ƒ Select best operating mode for the workload

ƒ VMware will support paravirtualized guests as they appear in enterprise distributions

ƒ VMI offers superior maintainability/flexibility

ƒ Performs as well as invasive paravirtualization

(32)

PAC346

VMware and CPU

Virtualization Technology

Jack Lo

Sr. Director, R&D

(33)

Backup slides

(34)

Performance of Binary Translation

ƒ BT provides many performance optimization opportunities

ƒ Fault elimination

ƒ Avoid costs of repeated virtual machine exits

ƒ Binary translator identifies faulting instructions and replaces them with special translations

ƒ Jump directly to appropriate handlers without an expensive fault

ƒ Guest and VMM share an address space:

reduces context switch costs

References

Related documents

In order to obtain insight into the runtime topology of a SOA system, we propose a framework-based runtime monitoring approach to trace the service interac- tions during execution..

In the present study, we have compared the outcomes of 100 consecutive LD-SCLC patients treated with definitive hypofractionated RT with the outcomes of a historical control group

VMware: The Virtualization Journey: Managing and Proving Compliance

This reference architecture builds upon innovative scale-out cloud server infrastructure platform, the PRIMERGY CX1000 and the virtualization technology of VMware vCloud

When we combine the operational cost savings VMware vSphere provides with the capital expenses the VMware Cost-Per-Application calculator predicts, we find that VMware

 Memory virtualization demands special hardware support (shadow page tables by VMWare or extended page table by Intel) to help translate virtual address

Choosing the best server virtualization hardware and storage protocols FAQ: How to select optimal memory, CPU and storage for virtualization Understanding VMware ESX

Security Design of the VMware Infrastructure Architecture VMware Infrastructure Architecture and Security Features Virtualization Layer CPU Virtualization Memory