27
Introduction to Virtualization Technology Introduction to Virtualization Technology Introduction to Virtualization Technology Introduction to Virtualization Technology Argentina Software Development Center Software and Solutions Group Gisela Giusti October 11, 2007 asdc asdc asdc asdc Argentina Software Argentina Software Argentina Software Argentina Software Development Center Development Center Development Center Development Center

Introduction to Virtualization Technology2005 Intel Centrino ™ Mobile Technology Intel Pentium M Processor Intel 915 Chipset Family Intel PRO Wireless Network Connection 2915ABG

  • Upload
    others

  • View
    11

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Introduction to Virtualization Technology2005 Intel Centrino ™ Mobile Technology Intel Pentium M Processor Intel 915 Chipset Family Intel PRO Wireless Network Connection 2915ABG

Introduction to Virtualization TechnologyIntroduction to Virtualization TechnologyIntroduction to Virtualization TechnologyIntroduction to Virtualization TechnologyArgentina Software Development Center

Software and Solutions GroupGisela Giusti

October 11, 2007

asdcasdcasdcasdcArgentina SoftwareArgentina SoftwareArgentina SoftwareArgentina Software

Development CenterDevelopment CenterDevelopment CenterDevelopment Center

Page 2: Introduction to Virtualization Technology2005 Intel Centrino ™ Mobile Technology Intel Pentium M Processor Intel 915 Chipset Family Intel PRO Wireless Network Connection 2915ABG

10/11/2007 2

Software @ IntelSoftware @ IntelSoftware @ IntelSoftware @ Intel

• 50+ R&D centers in 20+ countries

• 10.000+ software engineers

WesternWesternWesternWesternUnited StatesUnited StatesUnited StatesUnited States

ArizonaArizonaArizonaArizona

Folsom, CAFolsom, CAFolsom, CAFolsom, CA

Santa Clara, CA Santa Clara, CA Santa Clara, CA Santa Clara, CA

Southern CASouthern CASouthern CASouthern CA

ColoradoColoradoColoradoColorado

New MexicoNew MexicoNew MexicoNew Mexico

Portland, ORPortland, ORPortland, ORPortland, OR

UtahUtahUtahUtah

WashingtonWashingtonWashingtonWashington

Eastern / Eastern / Eastern / Eastern / Midwestern Midwestern Midwestern Midwestern United StatesUnited StatesUnited StatesUnited States

IllinoisIllinoisIllinoisIllinois

MassachusettsMassachusettsMassachusettsMassachusetts

New HampshireNew HampshireNew HampshireNew Hampshire

TexasTexasTexasTexas

VirginiaVirginiaVirginiaVirginia

Latin AmericaLatin AmericaLatin AmericaLatin America

ArgentinaArgentinaArgentinaArgentina

Israel /Israel /Israel /Israel /Western EuropeWestern EuropeWestern EuropeWestern Europe

Koln, GermanyKoln, GermanyKoln, GermanyKoln, Germany

Munich, GermanyMunich, GermanyMunich, GermanyMunich, Germany

Ulm, GermanyUlm, GermanyUlm, GermanyUlm, Germany

IsraelIsraelIsraelIsrael

Stockholm, SwedenStockholm, SwedenStockholm, SwedenStockholm, Sweden

Winnersh, UKWinnersh, UKWinnersh, UKWinnersh, UK

RussiaRussiaRussiaRussia

MoscowMoscowMoscowMoscow

Nizhniy NovgorodNizhniy NovgorodNizhniy NovgorodNizhniy Novgorod

NovosibirskNovosibirskNovosibirskNovosibirsk

SarovSarovSarovSarov

St. PetersburgSt. PetersburgSt. PetersburgSt. Petersburg

ChinaChinaChinaChina

BeijingBeijingBeijingBeijing

Hong KongHong KongHong KongHong Kong

ShanghaiShanghaiShanghaiShanghai

ShenzhenShenzhenShenzhenShenzhen

XiXiXiXi’’’’An ZizhuAn ZizhuAn ZizhuAn Zizhu

AsiaAsiaAsiaAsia

Sydney, AustraliaSydney, AustraliaSydney, AustraliaSydney, Australia

Bangalore, IndiaBangalore, IndiaBangalore, IndiaBangalore, India

Mumbai, IndiaMumbai, IndiaMumbai, IndiaMumbai, India

JapanJapanJapanJapan

Page 3: Introduction to Virtualization Technology2005 Intel Centrino ™ Mobile Technology Intel Pentium M Processor Intel 915 Chipset Family Intel PRO Wireless Network Connection 2915ABG

10/11/2007 3

• Mission Mission Mission Mission

– To be a Software Center of Excellence for Intel in the regionTo be a Software Center of Excellence for Intel in the regionTo be a Software Center of Excellence for Intel in the regionTo be a Software Center of Excellence for Intel in the region

• ASDC is part of Intel's Software and Solutions Group (SSG)

• Initiated activities in May 2006

• We work together with engineering groups all over the world

• Creating new productsnew productsnew productsnew products is part of our job

• We keep growinggrowinggrowinggrowing• Currently, 60 people• The center anticipates growing to 400+ engineers by 2011• Avg seniority is 6 years, 30% of the workforce has over 10 years experience• 16% PhDs, 23% MS• Publications and university teaching

Argentina Software Development Center (ASDC)Argentina Software Development Center (ASDC)Argentina Software Development Center (ASDC)Argentina Software Development Center (ASDC)

Page 4: Introduction to Virtualization Technology2005 Intel Centrino ™ Mobile Technology Intel Pentium M Processor Intel 915 Chipset Family Intel PRO Wireless Network Connection 2915ABG

10/11/2007 4

ASDC Engineering GroupsASDC Engineering GroupsASDC Engineering GroupsASDC Engineering Groups

PPQSPPQSPPQSPPQSProcess and Product

Quality Services

ASPIASPIASPIASPIArgentina Software

Pathfinding and Innovation

SOASSSOASSSOASSSOASSSOA Software

& Solutions

ASDCASDCASDCASDCSoftware Design and

Development

Research & Innovation

Process Engineering, Quality & Development

Tools

Page 5: Introduction to Virtualization Technology2005 Intel Centrino ™ Mobile Technology Intel Pentium M Processor Intel 915 Chipset Family Intel PRO Wireless Network Connection 2915ABG

10/11/2007 5

AgendaAgendaAgendaAgenda

• Non virtualized environments and Virtualized Environments

• Virtualization Usage Models

• The Virtual Machine Monitor (VMM)

• Challenges of running a VMM

• SW Solution for IA-32 arch without Intel-VT

• Top Ring Deprivileging holes

• Software workarounds to support Ring Deprivileging

• The Intel ® Virtualization Technology (VT-x)– New operating modes

– New transition mechanisms

– Virtual Machine Control Structure (VMCS)

– New instructions

• Conclusions

Page 6: Introduction to Virtualization Technology2005 Intel Centrino ™ Mobile Technology Intel Pentium M Processor Intel 915 Chipset Family Intel PRO Wireless Network Connection 2915ABG

10/11/2007 6

NonNonNonNon----virtualized Environmentvirtualized Environmentvirtualized Environmentvirtualized Environment

• The OS controls access to the hardware resources.

• The instruction set is divided into privileged and non-privileged.

• The machine can be in two modes of operation: user and supervisor

• Only non-privileged instructions can be executed in user mode.

• Any instruction can be executed in supervisor mode.

Hardware

Operating System

Application E

nvironment

Application E

nvironment

Application E

nvironment

Application E

nvironment

Rin

g 3

Rin

g 3

Rin

g 3

Rin

g 3

Rin

g 0

Rin

g 0

Rin

g 0

Rin

g 0

Page 7: Introduction to Virtualization Technology2005 Intel Centrino ™ Mobile Technology Intel Pentium M Processor Intel 915 Chipset Family Intel PRO Wireless Network Connection 2915ABG

10/11/2007 7

Virtualized EnvironmentVirtualized EnvironmentVirtualized EnvironmentVirtualized Environment

• Run multiple operating systems on a single physical platform

Platform HW

I/O DevicesProcessor/CSMemory

...

?? Software layer ???? Software layer ???? Software layer ???? Software layer ??

VMnVM0 VM1 AppnApp0

Guest OS0

App1

Guest OS1 Guest OSn

“Virtual Machines”

running

“Guest Operating Systems”

A software layer that manages the underlying physical resources

Page 8: Introduction to Virtualization Technology2005 Intel Centrino ™ Mobile Technology Intel Pentium M Processor Intel 915 Chipset Family Intel PRO Wireless Network Connection 2915ABG

10/11/2007 8

Virtualization Usage ModelsVirtualization Usage ModelsVirtualization Usage ModelsVirtualization Usage Models

HW

App2App1

OS

??

HW

App1 App2

OS OS

IsolationIsolationIsolationIsolation

HW1 HW2

App2App1

OS1 OS2

??

HW

App2App1

OS1 OS2

ConsolidationConsolidationConsolidationConsolidation

??

HW1

App

HW2

??

OS

??

HW1

App

HW2

??

OS

MigrationMigrationMigrationMigration

??

HW

AppApp

OS1 OS2

HidingHidingHidingHiding

Page 9: Introduction to Virtualization Technology2005 Intel Centrino ™ Mobile Technology Intel Pentium M Processor Intel 915 Chipset Family Intel PRO Wireless Network Connection 2915ABG

10/11/2007 9

The virtual machine monitor (VMM)The virtual machine monitor (VMM)The virtual machine monitor (VMM)The virtual machine monitor (VMM)

• The Virtual Machine Monitor is the software layer that controls the access to all hardware resources.

Platform HW

I/O DevicesProcessor/CSMemory

...

Virtual Machine Monitor (VMM)

VMnVM0 VM1 AppnApp0

Guest OS0

App1

Guest OS1 Guest OSn

Page 10: Introduction to Virtualization Technology2005 Intel Centrino ™ Mobile Technology Intel Pentium M Processor Intel 915 Chipset Family Intel PRO Wireless Network Connection 2915ABG

10/11/2007 10

Challenges of running a VMMChallenges of running a VMMChallenges of running a VMMChallenges of running a VMM

• OS and Apps in a VM don’t know that the VMM exists or that they share CPU resources with other VMs.

• VMM should isolate Guest SW stacks from one another.

• VMM should run protected from all Guest software

.

• VMM should present a virtual platform interface to Guest SW.

Page 11: Introduction to Virtualization Technology2005 Intel Centrino ™ Mobile Technology Intel Pentium M Processor Intel 915 Chipset Family Intel PRO Wireless Network Connection 2915ABG

10/11/2007 11

SW Solution for IASW Solution for IASW Solution for IASW Solution for IA----32 arch without Intel32 arch without Intel32 arch without Intel32 arch without Intel----VTVTVTVT

• Ring Ring Ring Ring DeprivilegingDeprivilegingDeprivilegingDeprivileging

– Run Guest OS above Ring-0 and have privileged instructions generate faults

– Run VMM in Ring-0 as a collection of fault handlers

VM0

Guest OS0

VM1

Guest OS1...

Platform Hardware

VM Monitor

App App...AppApp App...App

Ring 0Ring 0Ring 0Ring 0

Ring 1Ring 1Ring 1Ring 1

Ring 3Ring 3Ring 3Ring 3• The VMM interprets in

software privileged instructions that would be executed by an OS.

• Any non privileged instruction issued by an OS or Application Environment is executed directly by the machine.

Page 12: Introduction to Virtualization Technology2005 Intel Centrino ™ Mobile Technology Intel Pentium M Processor Intel 915 Chipset Family Intel PRO Wireless Network Connection 2915ABG

10/11/2007 12

Top Ring Top Ring Top Ring Top Ring DeprivilegingDeprivilegingDeprivilegingDeprivileging holesholesholesholes

• Ring Aliasing

– Problems that arise when software is run at a privilege level other than the privilege level for which it was written.

• Example: the SC segment register which points to the code segment. If the PUSHinstruction is executed with the CS segment register, the contents of that register (which include the current privilege level) is pushed on the stack. A guest OS could easily determine that it is not running at privilege level 0.

• Non-trapping instructions– There are IA-32 instructions that access privileged state and do not fault when

executed with insufficient privilege.

• Example, the IA-32 registers GDTR, IDTR, LDTR, and TR contain pointers to data structures that control CPU operation. Software can execute the instructions that read, or store, from these registers at any privilege level.

Page 13: Introduction to Virtualization Technology2005 Intel Centrino ™ Mobile Technology Intel Pentium M Processor Intel 915 Chipset Family Intel PRO Wireless Network Connection 2915ABG

10/11/2007 13

Top Ring Top Ring Top Ring Top Ring DeprivilegingDeprivilegingDeprivilegingDeprivileging holes (contholes (contholes (contholes (cont’’’’d)d)d)d)

• Excessive Faulting

– Ring deprivileging can interfere with the effectiveness of facilities in the IA-32 architecture that accelerate the delivery and handling of transitions to OS software. The IA-32 SYSENTER and SYSEXIT instructions support low-latency system calls. SYSENTER always effects a transition to privilege level 0, and SYSEXIT faults if executed outside that ring. Ring deprivileging thus has the following implications:

• Executions of SYSENTER by a guest application cause transitions to the VMM and not to the guest OS. The VMM must emulate every guest execution of SYSENTER.

• Executions of SYSEXIT by a guest OS cause faults to the VMM. The VMM must emulate every guest execution of SYSEXIT.

• CPU State Context Switching

– The VMM must save the current CPU state in each context switch to be reloaded in the next VM execution. To do that, the VMM uses part of the memory assigned to the VM.

• Address Space Compression

Page 14: Introduction to Virtualization Technology2005 Intel Centrino ™ Mobile Technology Intel Pentium M Processor Intel 915 Chipset Family Intel PRO Wireless Network Connection 2915ABG

10/11/2007 14

Software workarounds to support Ring Software workarounds to support Ring Software workarounds to support Ring Software workarounds to support Ring DeprivilegingDeprivilegingDeprivilegingDeprivileging

• Source Guest OS Modifications: Paravirtualization

– Example: Xen

• Developers of these VMMs modify the source code of a guest OS tocreate an interface that is easier to virtualize.

• Paravirtualization offers high performance and does not require changes to guest applications.

• A disadvantage of paravirtualization is that only support modified OS.

• Binary Guest OS Modifications

– Examples: Vmware, Virtual PC

• A VMM can support unmodified OSs by transforming guest-OS binaries on-the-fly to handle virtualization-sensitive operations.

Page 15: Introduction to Virtualization Technology2005 Intel Centrino ™ Mobile Technology Intel Pentium M Processor Intel 915 Chipset Family Intel PRO Wireless Network Connection 2915ABG

10/11/2007 15

IntelIntelIntelIntel® Virtualization Technology (VTVirtualization Technology (VTVirtualization Technology (VTVirtualization Technology (VT----x)x)x)x)

• Apps run deprivileged in ring 3

• OSs run deprivileged in ring 0

• VMM runs in a new mode with full privilege.

VM0

Guest OS0

VM1

Guest OS1...

Platform Hardware

VM Monitor

App App...AppApp App...App

• Guest SW runs deprivileged in a new operating mode

• VMM preempts execution of Guest SW via new HW-based transition mechanism

Page 16: Introduction to Virtualization Technology2005 Intel Centrino ™ Mobile Technology Intel Pentium M Processor Intel 915 Chipset Family Intel PRO Wireless Network Connection 2915ABG

10/11/2007 16

New Operating ModesNew Operating ModesNew Operating ModesNew Operating Modes

• VMX root VMX root VMX root VMX root operation:

– Full privileged, intended for Virtual Machine Monitor

• VMX nonVMX nonVMX nonVMX non----rootrootrootroot operation:

– Not fully privileged, intended for guest software

� Both forms of operation support all four privilege levels from 0Both forms of operation support all four privilege levels from 0Both forms of operation support all four privilege levels from 0Both forms of operation support all four privilege levels from 0 to 3to 3to 3to 3

Page 17: Introduction to Virtualization Technology2005 Intel Centrino ™ Mobile Technology Intel Pentium M Processor Intel 915 Chipset Family Intel PRO Wireless Network Connection 2915ABG

10/11/2007 17

New transition mechanismsNew transition mechanismsNew transition mechanismsNew transition mechanisms

• VM entry

– from VMX root operation mode to VMX non-root operation mode

• VM exit

– From VMX non-root operation mode to VMX root operation mode

Platform Hardware

VM1

VMM

VM0

Guest OS0

App AppApp ...

...

Guest OS1

App AppApp ...

VM Exit VM Entry

Page 18: Introduction to Virtualization Technology2005 Intel Centrino ™ Mobile Technology Intel Pentium M Processor Intel 915 Chipset Family Intel PRO Wireless Network Connection 2915ABG

10/11/2007 18

Virtual Machine Control Structure (VMCS)Virtual Machine Control Structure (VMCS)Virtual Machine Control Structure (VMCS)Virtual Machine Control Structure (VMCS)

• Data structure that manages VM entries and VM exits.

• VMCS contains fields corresponding to:

– Processor state of the Guest area (VM state)

– Processor state of the Host area (VMM state)

• VM entries load processor state from the guest-state area.

• VM exits save processor state to the guest-state and then load processor state from the host-state area

� Only one VMCS active per virtual processor at any given time

Page 19: Introduction to Virtualization Technology2005 Intel Centrino ™ Mobile Technology Intel Pentium M Processor Intel 915 Chipset Family Intel PRO Wireless Network Connection 2915ABG

10/11/2007 19

VTVTVTVT----x New instructionsx New instructionsx New instructionsx New instructions

• VMLAUNCH: Used on initial transition from VMM to Guest

– Enters VMX non-root operation mode

• VMRESUME: Used on subsequent entries

– Enters VMX non-root operation mode

– Loads Guest state and Exit criteria from VMCS

• VMEXIT

– Used on transition from Guest to VMM

– Enters VMX root operation mode

– Saves Guest state in VMCS

– Loads VMM state from VMCS

• VMPTRLD

– Establishes a pointer to a desired VMCS

• VMREAD

– Read from a VMCS

• VMWITE

– Write to a VMCS

Page 20: Introduction to Virtualization Technology2005 Intel Centrino ™ Mobile Technology Intel Pentium M Processor Intel 915 Chipset Family Intel PRO Wireless Network Connection 2915ABG

10/11/2007 20

ConclusionsConclusionsConclusionsConclusions

• VT Reduces guest OS dependency

– Eliminates need for binary patching / translation

– Facilitates support for Legacy OS

• VT improves robustness

– Eliminates need for complex SW techniques

– Simpler and smaller VMMs

– Smaller trusted-computing base

• VT improves performance

– Fewer unwanted Guest � VMM transitions

Page 21: Introduction to Virtualization Technology2005 Intel Centrino ™ Mobile Technology Intel Pentium M Processor Intel 915 Chipset Family Intel PRO Wireless Network Connection 2915ABG

10/11/2007 21

Thank you!Thank you!Thank you!Thank you!

Contacts to: [email protected]

Reference to: [email protected]

Page 22: Introduction to Virtualization Technology2005 Intel Centrino ™ Mobile Technology Intel Pentium M Processor Intel 915 Chipset Family Intel PRO Wireless Network Connection 2915ABG
Page 23: Introduction to Virtualization Technology2005 Intel Centrino ™ Mobile Technology Intel Pentium M Processor Intel 915 Chipset Family Intel PRO Wireless Network Connection 2915ABG

10/11/2007 23

BackupBackupBackupBackup

Page 24: Introduction to Virtualization Technology2005 Intel Centrino ™ Mobile Technology Intel Pentium M Processor Intel 915 Chipset Family Intel PRO Wireless Network Connection 2915ABG

10/11/2007 24

•• World leader in silicon based advanced World leader in silicon based advanced technology innovation with more than technology innovation with more than 38 years of leadership in computer 38 years of leadership in computer science and communicationsscience and communications

•• Foundation: 1968Foundation: 1968•• Employees: 90,000+Employees: 90,000+•• Products and services: 450+Products and services: 450+•• Offices and Installations worldwide: 294Offices and Installations worldwide: 294

Page 25: Introduction to Virtualization Technology2005 Intel Centrino ™ Mobile Technology Intel Pentium M Processor Intel 915 Chipset Family Intel PRO Wireless Network Connection 2915ABG

VT Client RoadmapVT Client Roadmap

2005 Lyndon*2005 Lyndon*IntelIntel ®® PentiumPentium ®® 4 Processor4 Processor945G Chipset945G ChipsetHT, XD, EM64T, EIST, Intel AMT, HT, XD, EM64T, EIST, Intel AMT, VTVT

2006 Averill*2006 Averill*Intel Pentium 4 Processor & DCIntel Pentium 4 Processor & DCBroadwater Chipset Broadwater Chipset 2005 features plus Intel AMT2, LT2005 features plus Intel AMT2, LT

2005 Intel 2005 Intel CentrinoCentrino ™™ Mobile TechnologyMobile TechnologyIntel Pentium M ProcessorIntel Pentium M ProcessorIntel 915 Chipset FamilyIntel 915 Chipset FamilyIntel PRO Wireless Network Connection 2915ABG & 220 0BG, Intel PRO Wireless Network Connection 2915ABG & 220 0BG, XD, EISTXD, EIST

2006 Napa*2006 Napa*Mobile Dual Core Processor codeMobile Dual Core Processor code --named named ““ YonahYonah ””Chipset codeChipset code --named named ““ CalistogaCalistoga ””Wireless LAN solution codeWireless LAN solution code --named named ““ GolanGolan ””2005 features plus2005 features plus VTVT, Intel AM, Intel AM

Page 26: Introduction to Virtualization Technology2005 Intel Centrino ™ Mobile Technology Intel Pentium M Processor Intel 915 Chipset Family Intel PRO Wireless Network Connection 2915ABG

2006 2006 BensleyBensley *, *, GlidewellGlidewell **Dempsey Dempsey Blackford & Blackford & GreencreekGreencreek2005 features plus 2005 features plus VTVT, IAMT, I/OAT, IAMT, I/OAT

2 Socket

2 Socket

≥ 4 Socket

2005 2005 -- 2006 2006 Millington / DP MontvaleMillington / DP MontvaleIntelIntel ®® 8870, Enabled8870, EnabledDual Core, MT, Foxton, Pellston, Dual Core, MT, Foxton, Pellston, VTVT

2005 2005 -- 2006 2006 Montecito / MontvaleMontecito / MontvaleIntelIntel ®® 8870 / Enabled8870 / EnabledMT, Foxton, Pellston, MT, Foxton, Pellston, VTVT

VT Server RoadmapVT Server Roadmap

Page 27: Introduction to Virtualization Technology2005 Intel Centrino ™ Mobile Technology Intel Pentium M Processor Intel 915 Chipset Family Intel PRO Wireless Network Connection 2915ABG

27

* Other names and brands may be claimed as the property of others.

vPro Virtual Appliance Roadmap

WeybridgeWeybridgeQ3Q3’’0707

AverillAverillShippingShipping

McCrearyMcCrearyQ3Q3’’0808

Intel® Core™ 2 Duo processor family

(Conroe)Processor

Intel® Core™ 2 Duo (Conroe and Wolfdale)

Intel® Core™ 2 Quad (Yorkfield)

Intel® Core™ 2 Duo (Wolfdale)

Intel® Core™ 2 Quad (Yorkfield)

Intel® Q965 Express Chipset w/ ICH8-DO

Chipset

Intel® Q35 Express Chipset w/ ICH9-DO

Intel® Eaglelake Express Chipset w/

ICH10-DO

Intel® 82566DM (Nineveh)

Networking

Intel® 82567LM(Boazman)

Intel ® Virtualization Technology (VTx)

Intel ® Active Mgmt Technology 2.0*

EM64T, EIST

*Intel® AMT2.1 FW is needed for EIT VA 2.0

*T’s

TIntel ® Virtualization

Technology (VTx+VTd)

Intel ® Active Mgmt Technology ver 3.0

Intel® Trusted Execution Technology

EM64T, EIST

Intel ® Virtualization Technology (VTx+VTd)

Intel ® Active Mgmt Technology ver 5.0

Intel® Trusted Execution Technology

EM64T, EIST

SecurityTPM 1.2

(Discrete)TPM 1.2

(in Eaglelake)

MontevinaMontevinaQ2Q2’’0808

Intel® Core™ 2 Duo (Penryn)

Intel® Cantiga Chipset w/ ICH9-M

Intel® 82567LM(Boazman)

Intel® WiFi (Shiloh)

Intel ® Virtualization Technology (VTx+VTd)

Intel ® Active Mgmt Technology ver 4.0

Intel® TrustedExecution Technology

EM64T, EIST

TPM 1.2 (in Cantiga)

Intel® 82566DM (Nineveh)