Nested Virtualization



Similar documents
Nested Virtualization

Architecture of the Kernel-based Virtual Machine (KVM)

Full and Para Virtualization

Nested Virtualization

Beyond the Hypervisor

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

Hypervisors and Virtual Machines

kvm: Kernel-based Virtual Machine for Linux

Virtualization in Linux KVM + QEMU

KVM Architecture Overview

KVM: A Hypervisor for All Seasons. Avi Kivity avi@qumranet.com

Intel Virtualization Technology Overview Yu Ke

Virtual Machines. COMP 3361: Operating Systems I Winter

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

Hardware Based Virtualization Technologies. Elsie Wahlig Platform Software Architect

Performance tuning Xen

Kernel Virtual Machine

The Turtles Project: Design and Implementation of Nested Virtualization

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

Cloud Computing CS

Virtualization Technology. Zhiming Shen

Virtualization Technologies

Taming Hosted Hypervisors with (Mostly) Deprivileged Execution

Virtual machines and operating systems

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

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

IOS110. Virtualization 5/27/2014 1

Enabling Technologies for Distributed Computing

RED HAT ENTERPRISE VIRTUALIZATION & CLOUD COMPUTING

Installing & Using KVM with Virtual Machine Manager COSC 495

Large-scale performance monitoring framework for cloud monitoring. Live Trace Reading and Processing

Virtualization VMware Inc. All rights reserved

Virtualization. Types of Interfaces

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

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

Enabling Technologies for Distributed and Cloud Computing

Advanced Computer Networks. Network I/O Virtualization

Comparing Free Virtualization Products

KVM, OpenStack, and the Open Cloud

Using Linux as Hypervisor with KVM

Virtualizing a Virtual Machine

Virtual Machines. Virtual Machine (VM) Examples of Virtual Systems. Types of Virtual Machine

2972 Linux Options and Best Practices for Scaleup Virtualization

Deploy and test ovirt using nested virtualization environments. Mark Wu

Enabling Intel Virtualization Technology Features and Benefits

BHyVe. BSD Hypervisor. Neel Natu Peter Grehan

RPM Brotherhood: KVM VIRTUALIZATION TECHNOLOGY

VIRTUALIZATION 101. Brainstorm Conference 2013 PRESENTER INTRODUCTIONS

GUEST OPERATING SYSTEM BASED PERFORMANCE COMPARISON OF VMWARE AND XEN HYPERVISOR

Virtualization with Windows

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

Virtualization. Pradipta De

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

KVM in Embedded Requirements, Experiences, Open Challenges

Real-time KVM from the ground up

ARM VIRTUALIZATION FOR THE MASSES. Christoffer Dall

StACC: St Andrews Cloud Computing Co laboratory. A Performance Comparison of Clouds. Amazon EC2 and Ubuntu Enterprise Cloud

kvm: the Linux Virtual Machine Monitor

Introduction to Virtualization & KVM

Securing Your Cloud with Xen Project s Advanced Security Features

The QEMU/KVM Hypervisor

Chapter 5 Cloud Resource Virtualization

Hypervisor Memory Forensics

Performance Evaluation of Intel EPT Hardware Assist VMware ESX builds & (internal builds)

COS 318: Operating Systems. Virtual Machine Monitors

Virtualization Technologies and Blackboard: The Future of Blackboard Software on Multi-Core Technologies

Virtualization. Dr. Yingwu Zhu

Introduction to Virtual Machines

KVM, OpenStack, and the Open Cloud

Hypervisor Software and Virtual Machines. Professor Howard Burpee SMCC Computer Technology Dept.

Hybrid Virtualization The Next Generation of XenLinux

Virtualization. Jukka K. Nurminen

Virtualizare sub Linux: avantaje si pericole. Dragos Manac

KVM Virtualization Roadmap and Technology Update

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

Virtualization. Jia Rao Assistant Professor in CS

Intro to Virtualization

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

How To Make A Minecraft Iommus Work On A Linux Kernel (Virtual) With A Virtual Machine (Virtual Machine) And A Powerpoint (Virtual Powerpoint) (Virtual Memory) (Iommu) (Vm) (

SUSE Linux Enterprise 10 SP2: Virtualization Technology Support

Compromise-as-a-Service

Real-Time Virtualization How Crazy Are We?

x86 Virtualization Hardware Support Pla$orm Virtualiza.on

KVM: Kernel-based Virtualization Driver

KVM KERNEL BASED VIRTUAL MACHINE

I/O Virtualization The Next Virtualization Frontier

Security Challenges in Virtualized Environments

Windows 7 XP Mode for HP Business PCs

KVM Security Comparison

Practical Protection of Kernel Integrity for Commodity OS from Untrusted Extensions

Basics of Virtualisation

Real-Time KVM for the Masses Unrestricted Siemens AG All rights reserved

Virtualization for Cloud Computing

Dynamic Load Balancing of Virtual Machines using QEMU-KVM

Database Virtualization

Monitoring Databases on VMware

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

Performance Evaluation of VMXNET3 Virtual Network Device VMware vsphere 4 build

SUSE Virtualization Technologies Roadmap

Transcription:

Nested Virtualization State of the art and future directions Bandan Das Yang Z Zhang Jan Kiszka

2 Outline Introduction Changes and Missing Features for AMD Changes and Missing Features for Intel Working hypervisors and performance evaluation Discussion on other ongoing work Migration Support VT-d emulation Wrap-up and Questions

3 Introduction Nested Virtualization Linux Windows Windows Xen ESX Linux/KVM Hardware

4 Introduction Uses Operating system hypervisors (Linux/KVM, WinXP mode in newer versions of Windows) Cloud Computing Give users the ability to run their own hypervisors! Security Mcafee DeepSafe Testing/debugging hypervisors Use Me! Interoperability

5 Introduction How it works (on Intel) L 0 runs L 1 with VMCS 01 Linux L 2 (Nested) L 1 wants to run L 2 and executes vmlaunch with VMCS 12 Xen VMCS 12 L 1 vmlaunch traps to L 0 L 0 merges VMCS 01 with VMCS 12 to create VMCS 02 and run L 2 L 0 VMCS 01 VMCS 02 If L 2 traps, we are back in L 0 L 0 decides whether to handle trap itself or forward to L 1 Eventually L 0 resumes L 1... KVM Hardware

6 Nested Virtualization - AMD Stable codebase nested is enabled by default AMD-v Advanced virtual Interrupt Controller (AVIC) Hardware yet to arrive! More Testing Hard to find bugs always exist! Newer releases of common and new hypervisors Nesting introduces I/O bottlenecks Are we spec compliant?

7 Nested Virtualization - Intel Recent Changes Specification conformance Additional error checks on emulated vmx functions Corresponding tests in kvm-unit-tests Intel Memory Protection Extensions Bounds checking on memory references VMX support: clear BNDCFGS and BNDCFGS VMCS exit controls and BNDCFGS VMCS field Nested Support: Let L1 hypervisor read and write the MPX controls(vmcs 12 - >guest_bndcfgs) Tracing improvements

8 Nested Virtualization - Intel Recent Changes Interrupt Acknowledgement Emulation Interrupt Injection Rework Inspired by Jailhouse hypervisor Also speeds up Windows execution (Complemented by TPR Shadow support) Inject Virtual Interrupt No L 2 running External Interrupt Exit to L 0 Handle Interrupt Interrupt for L 1 Yes Acknowledge? Resume L1 Yes Write Vector to VMCS 12

9 Nested Virtualization - Intel Improve Stability More testing Nested vmx is still disabled by default! The test matrix is quite complicated with so many configurations and hypervisors Are we specification compliant? Also helps in identifying buggy hypervisors

10 Nested Virtualization - Intel Nested VPID Virtual Processor Identifier Tag address space and avoid a TLB flush We don't advertise vpid to the L 1 hypervisor L 0 uses the same vpid to run L 1 and all its guests KVM flushes vpid when switching between L 1 and L 2 Advertise vpid and maintain a mapping for L1's vpids L 0 TLB Flush VPID1 VPID1 Add Translation 1 Add Translation 2 Run Run L 1 L 2

11 Nested Virtualization - Intel MSR load/store Hypervisor loads/saves a MSR list during VMENTER/VMEXIT Mandatory according to specification Nested APIC-v Reduce VMEXITS Motivation: performance gains

12 AMD Status Test Environment Host (L 0 ) AMD Opteron(tm) Processor 6386 SE (16 cores), 32 GB RAM, Fedora 20 Qemu options to run L 1 : -cpu host -m 20G -smp 10 Qemu options L 1 uses to run L 2 : -cpu qemu64 -m 8G -smp 8 Guest Status (L1 hypervisor) Linux (Fedora 20 64 bit) Xen 4.4.3 running in Ubuntu 12.04 JailHouse ESX

13 AMD Performance Evaluation Test Environment Host: AMD Opteron(tm) Processor 6386 SE / 32 GB RAM L 0, L 1 and L 2 : Fedora 20 Kernel 3.17.0-rc1 (L 0 ) SPECJBB (2013) Backend only, Controller/Transaction Injectors on a different host Qemu cmdline: -smp n (1, 2, 4 and 8) -m 16G -cpu qemu64 Compare L1 and L2 performance numbers Kernel Compilation Use time to measure compilation times under the same setup

14 AMD Performance Evaluation Kernel Compilation 100 95 90 80 78 Approximate Time 70 60 50 40 30 20 10 42 52 22 29 12 20 L1 L2 0 1 2 4 8 Number of vcpus

15 AMD Performance Evaluation Kernel Compilation (Evaluation) Comparable times across the vcpu range make is CPU intensive

16 AMD Performance Evaluation SPECJBB (Distributed with Backend in L2 ) max-jops (%) 100 90 80 70 60 50 40 30 20 10 0 71 59 61 60 1 2 4 8 L1 L2 Number of vcpus

17 AMD Performance Evaluation SPECJBB (Evaluation) L 2 nearly at 50% of L 1 's performance TODO: Investigating bottlenecks in the nested setup Bottlenecks I/O Bottlenecks? The test setup creates a qcow2 image inside L1 File systems are nested Can APIC-v help?

18 Intel - Status Test Environment Host (L 0 ) IvyTown_EP 16 Cores 128GB RAM Qemu options to run L 1 : -cpu host -m 20G -smp 10 Qemu options L 1 uses to run L 2 : -cpu qemu64 -m 8G -smp 8 Guest Status... not so good news

19 Intel - Status Some not yet impressive matrix L2 Guest L1 Guest RHEL 6.5 64-bit RHEL 6.5 32-bit Windows 7 64-bit Windows 7 32-bit Xen KVM VMware ESX VMware Player HAXM Win7 XP Mode N/A N/A Hyper-V VirtualBox

20 Intel Performance Evaluation Kernel Compilation 60 Approximate Time 50 40 30 20 10 41 48 31 39 24 32 14 19 L1 L2 0 1 2 4 8 Number of vcpus

21 Intel Performance Evaluation Kernel Compilation (Evaluation) CPU intensive workloads fare quite well But... do they always?

22 Intel Performance Evaluation SPECJBB 100 90 80 max-jops (%) 70 60 50 40 30 20 10 9% 6% 5% 6% L1 L2 0 1 2 4 8 Number of vcpus

23 Intel Performance Evaluation SPECJBB (Evaluation) What went wrong? Incorrect Test Setup? Newer machines => newer processor features => how is Nested Virtualization affected? Maturity: still needs right setup to work I wish I was better :(

24 Nested Virtualization and Migration Nested VMs implies no migration! ;-) But in all seriousness: Challenge: Live migrate L1 with all its L 2 guests Save all nested state: vmcs12, struct nested_vmx, etc but how?

25 Nested Virtualization and Migration One option: Force an exit from L 2 to L 1 (if running in L 2 ) feasible with all L 1 setups? Save all current vmcs 02 state to vmcs 12 L 2 specific dirtied pages need to be copied Nested state metadata gets transferred to destination with L 1 's memory If running in L 2 on source, need to do the same on destination Another option: Save/restore additional CPU states, just like additional registers

26 Nested IOMMU Use cases Testing Device assignment to L2 History AMD IOMMU emulation for QEMU (Eduard-Gabriel Munteanu, 2011) Lacking memory layer abstractions Required many device model hooks SPARC QEMU model with own IOMMU layer

27 Nested IOMMU - Today IOMMU support in QEMU memory layer, used for POWER Alpha...and Intel! VT-d emulation developed as GSoC project by Le Tan DMAR emulation, supports all PCI device models Error reporting Cache emulation VT-d interrupt remapping emulation Working prototype Lacks error reporting

28 Nested IOMMU Open Topics Support for physical devices Full in-kernel IOMMU model? => ARM SMMU model by Will Deacon, see Linux Plumber IOMMU track Use of VFIO from userspace model? IR emulation with in-kernel irqchips Requires extension to translate IOAPIC IRQs AMD IOMMU, reloaded?

29 Wrap-Up AMD Nested Virtualization support in good shape Regular testing required nevertheless (autotest?) Intel Nested Virtualization Add missing mandatory features More testing (Intel integration tests, autotest?) Once stable, address migration IOMMU emulation & nesting approaching Non-x86...?