Virtualization. Clothing the Wolf in Wool. Wednesday, April 17, 13

Similar documents
Virtualization. Jia Rao Assistant Professor in CS

Uses for Virtual Machines. Virtual Machines. There are several uses for virtual machines:

Full and Para Virtualization

Virtual Machines. COMP 3361: Operating Systems I Winter

CS 695 Topics in Virtualization and Cloud Computing. More Introduction + Processor Virtualization

x86 ISA Modifications to support Virtual Machines

A Unified View of Virtual Machines

Virtualization. ! Physical Hardware. ! Software. ! Isolation. ! Software Abstraction. ! Encapsulation. ! Virtualization Layer. !

ARM Virtualization: CPU & MMU Issues

x86 Virtualization Hardware Support Pla$orm Virtualiza.on

Introduction to Virtual Machines

Virtualization. Pradipta De

Virtual machines and operating systems

Virtualization Technology. Zhiming Shen

System Virtual Machines

Hypervisors and Virtual Machines

Virtualization. Types of Interfaces

Platform Virtualization: Model, Challenges and Approaches

COS 318: Operating Systems. Virtual Machine Monitors

Chapter 5 Cloud Resource Virtualization

Cloud Computing #6 - Virtualization

Microkernels, virtualization, exokernels. Tutorial 1 CSC469

CS5460: Operating Systems. Lecture: Virtualization 2. Anton Burtsev March, 2013

Introduction to Virtual Machines

Virtualization. Dr. Yingwu Zhu

Virtualization. Explain how today s virtualization movement is actually a reinvention

IOS110. Virtualization 5/27/2014 1

Virtualization VMware Inc. All rights reserved

Analysis of the Intel Pentium s Ability to Support a Secure Virtual Machine Monitor

Hypervisors. Introduction. Introduction. Introduction. Introduction. Introduction. Credits:

Understanding Full Virtualization, Paravirtualization, and Hardware Assist. Introduction...1 Overview of x86 Virtualization...2 CPU Virtualization...

Chapter 16: Virtual Machines. Operating System Concepts 9 th Edition

Virtual Machines.

Virtualization and the U2 Databases

Multi-core Programming System Overview

Virtualization. Jukka K. Nurminen

Hardware Based Virtualization Technologies. Elsie Wahlig Platform Software Architect

Virtual Machines. Virtualization

Outline. Outline. Why virtualization? Why not virtualize? Today s data center. Cloud computing. Virtual resource pool

Virtualization for Cloud Computing

Virtual Machine Monitors. Dr. Marc E. Fiuczynski Research Scholar Princeton University

Intel s Virtualization Extensions (VT-x) So you want to build a hypervisor?

Hybrid Virtualization The Next Generation of XenLinux

Jukka Ylitalo Tik TKK, April 24, 2006

VMware Server 2.0 Essentials. Virtualization Deployment and Management

Basics of Virtualisation

Virtualization. Mike Kasick Glenn Willen Mike Cui. April 16, : Operating System Design & Implementation

Virtualization in Linux KVM + QEMU

OS Virtualization. CSC 456 Final Presentation Brandon D. Shroyer

Cloud Computing CS

Intel Virtualization Technology and Extensions

9/26/2011. What is Virtualization? What are the different types of virtualization.

Xen and the Art of. Virtualization. Ian Pratt

Virtualization. P. A. Wilsey. The text highlighted in green in these slides contain external hyperlinks. 1 / 16

Enabling Technologies for Distributed Computing

Distributed Systems. Virtualization. Paul Krzyzanowski

ELEC 377. Operating Systems. Week 1 Class 3

COS 318: Operating Systems. Virtual Machine Monitors

FRONT FLYLEAF PAGE. This page has been intentionally left blank

UEFI Hypervisors Winning the Race to Bare Metal

Data Centers and Cloud Computing

Enabling Technologies for Distributed and Cloud Computing

Knut Omang Ifi/Oracle 19 Oct, 2015

Basics in Energy Information (& Communication) Systems Virtualization / Virtual Machines

Clouds, Virtualization and Security or Look Out Below

Intel Virtualization Technology Overview Yu Ke

Virtualization Technologies (ENCS 691K Chapter 3)

Virtualization Technology. Zhonghong Ou Data Communications Software Lab, Aalto University

Detecting the Presence of Virtual Machines Using the Local Data Table

Cloud^H^H^H^H^H Virtualization Technology. Andrew Jones May 2011

BHyVe. BSD Hypervisor. Neel Natu Peter Grehan

Brian Walters VMware Virtual Platform. Linux J. 1999, 63es, Article 6 (July 1999).

Models For Modeling and Measuring the Performance of a Xen Virtual Server

matasano Hardware Virtualization Rootkits Dino A. Dai Zovi

Intel Virtualization Technology

Nested Virtualization

Enterprise-Class Virtualization with Open Source Technologies

Arwed Tschoeke, Systems Architect IBM Systems and Technology Group

PROCESSOR VIRTUALIZATION ON EMBEDDED LINUX SYSTEMS

12. Introduction to Virtual Machines

nanohub.org An Overview of Virtualization Techniques

Cloud Computing. Dipl.-Wirt.-Inform. Robert Neumann

Chapter 2 Addendum (More on Virtualization)

RPM Brotherhood: KVM VIRTUALIZATION TECHNOLOGY

Virtual Servers. Virtual machines. Virtualization. Design of IBM s VM. Virtual machine systems can give everyone the OS (and hardware) that they want.

Virtualization Technologies

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

Intel Virtualization Technology (VT) in Converged Application Platforms

evm Virtualization Platform for Windows

Implementation of a Purely Hardware-assisted VMM for x86 Architecture

Virtualisation M2 P7 2015

Hardware accelerated Virtualization in the ARM Cortex Processors

Introduction to Virtualization

kvm: Kernel-based Virtual Machine for Linux

Virtualization: Concepts, Applications, and Performance Modeling

An Implementation Of Multiprocessor Linux

Clouds Under the Covers. Elgazzar - CISC Fall

Windows Server Virtualization & The Windows Hypervisor

Transcription:

Virtualization Clothing the Wolf in Wool

Virtual Machines Began in 1960s with IBM and MIT Project MAC Also called open shop operating systems Present user with the view of a bare machine Execute most instructions directly, but trap operations that would reveal the fiction, and emulate Hot topic until Unix, then architectural support drops Example of M68010

Advantages Greater security -- more isolation of tasks Ability to manage QoS for tasks Easy to profile tasks Can run multiple operating systems Can test and debug new OS code directly

Disadvantages More complex OS/VMM Takes more resources than kernel OS Requires hardware support Can be slow if hardware support is weak

Gerald Popek CACM 1974 Formal Requirements for Virtualizable Third Generation Architectures

Requirements Equivalence: Virtual machine must look like bare HW (but smaller) Resource control: All resources are virtualized and managed by the VMM Efficiency: Has to be nearly as fast as running natively

Instruction Types Privileged: Implies supervisor state with special instr. Control sensitive: Changes processor mode, or memory map Behavior sensitive: Behavior depends on mode or on location (anything that can reveal state of other tasks) A VMM requires that the sensitive instructions be a subset of the privileged instructions

Recursive Virtualizability If there is proper HW support, a VM can run recursively within itself Allows nested operating systems, layers of control Rarely supported

Paravirtualization Can fake with JIT or direct binary translation (DBT) XEN approach when no HW virtualization mode Can t be completely hidden from adversary

Sensitive, Non-privileged x86 Instructions SGDT Store Global Descriptor Table register SIDT Store Interrupt Descriptor Table register SLDT Store Local Descriptor Table register SMSW Store Machine Status Word PUSHF(D) Push EFLAGS register on stack (16 and 32-bit versions) POPF(D) Pop EFLAGS register from stack, with some privilege levels (16 and 32-bit versions)

Sensitive, Non-privileged x86 Instructions LAR Load access rights into GP register LSL Load segment address limit into GP register VERR Verify if code/data segment is readable based on current protection level VERW Verify is code/data segment is writeable based on current protection level POP Can raise general protection exception depending on target register and protection level PUSH Can push protection status onto the stack

Sensitive, Non-privileged x86 Instructions CALL Can call to same or a different privilege level, saving return info JMP Like CALL, but without saving return info INT n Like a far CALL to a different level, but also pushes EFLAGS on stack RET Can return between privilege levels STR Store segment selector (including privilege bits) MOV Can be used to load or store control register set

Virtualization Extensions VT-x introduced 2005 by Intel AMD-V introduced 2006 by AMD AMD Rapid Virtualization Indexing (nested page tables) adds hardware to MMU Intel adds Extended Page Tables VT-D provides virtualization of directed I/O, trapping DMA, etc. Typically not enabled in BIOS VirtualBox claims to be faster without VT-x

Itanium Example Trap to a higher level, setting violation status Can only return to a lower level resetting status Can t forward the violation to a guest OS to handle

Beyond the ISA Areas that are hard to virtualize Complex virtual memory I/O and network devices Graphics, GPUs Multithreading Cache coherence Multicore TLB, branch predictor -- clever optimizations can backfire when they are virtual

Discussion

James Smith ISCA 2006 Reducing Startup Time in Co-Designed Virtual Machines

Definitions Architected (virtual) ISA - Emulated Implementation (native) ISA - Hardware Virtual Machine Monitor - translates and provides services so programs for the architected ISA can run on the implementation ISA Dynamic Binary Translator - one approach to VMM

Binary Translation High overhead -- thousands of instructions per instruction translated Start with emulation (10X to 100X slower) Unoptimized basic block translation into code cache (sometimes with emulation, sometimes instead) Hotspots identified for optimized translation

Workloads Small code size, long running -- best case Short-running or fine-grain cooperating tasks -- finish before being translated Real-time -- has constraints that can t be met Multitasking server apps -- many context switches OS boot-up, shut-down, sleep -- time sensitive

Baseline Architecture x86 instructions broken into micro ops Pair of dependent micro ops is fused into a macro-op Macro-ops stay together in pipes Simplifies forwarding logic, instruction scheduler Claimed 18% IPC increase for SPEC 2006

Basic Process Crack x86 instructions into micro-ops Optimize schedule and reassociate into macro-ops Optimizing DBT takes 1000 instructions/x86 instruction

Architecture

Process

Scenarios Disk startup and post context switch Need to translate architected ISA inst. to imp. ISA Transient: translation already in code cache Will still be in lower cache levels after short pause Steady state -- code is translated and running from upper levels of cache With optimal choice of hotspot threshold, BBT accounts for 3/4 of translation overhead

Frontend Dual Mode Decoder First stage cracks x86 ops Second stage processes micro-ops, including cached Eliminates BBT, so requires hardware profiling instead

Backend Functional Units Frontend is time critical Instead, augment BBT with special cracking instruction Decodes an x86 instruction into micro-ops Sets status -- e.g., if skipping complex instruction and sending it to software for decoding Run within a tight execution loop

Execution Loop

Experimental Setup

Startup Performance

Power: Decoder turnoff

Discussion