Silver Bullet of Virtualization. Challenges and Concerns. May 27, 2013 v1.0

Similar documents
Building High Performance, Power Efficient Cortex and Mali systems with ARM CoreLink. Robert Kaye

Virtualizaton: One Size Does Not Fit All. Nedeljko Miljevic Product Manager, Automotive Solutions MontaVista Software

Smart Antennas and Hypervisor: Enabling Secure Convergence. July 5, 2017

Hypervisor Market Overview. Franz Walkembach. for GENIVI AMM, April 19 th, 2018 (Munich) SYSGO AG Public

Virtualization. Starting Point: A Physical Machine. What is a Virtual Machine? Virtualization Properties. Types of Virtualization

Virtualization. ! Physical Hardware Processors, memory, chipset, I/O devices, etc. Resources often grossly underutilized

Virtualization. ...or how adding another layer of abstraction is changing the world. CIS 399: Unix Skills University of Pennsylvania.

Lecture 5. KVM for ARM. Christoffer Dall and Jason Nieh. 5 November, Operating Systems Practical. OSP Lecture 5, KVM for ARM 1/42

Porting bhyve on ARM. Mihai Carabas, Peter Grehan BSDCan 2016 University of Ottawa Ottawa, Canada June 10 11, 2016

Virtualization. Michael Tsai 2018/4/16

CSE 120 Principles of Operating Systems

Introduction to Cloud Computing and Virtualization. Mayank Mishra Sujesha Sudevalayam PhD Students CSE, IIT Bombay

Real Safe Times in the Jailhouse Hypervisor Unrestricted Siemens AG All rights reserved

The Evolution of the ARM Architecture Towards Big Data and the Data-Centre

What is KVM? KVM patch. Modern hypervisors must do many things that are already done by OSs Scheduler, Memory management, I/O stacks

The Architecture of Virtual Machines Lecture for the Embedded Systems Course CSD, University of Crete (April 29, 2014)

The Challenges of X86 Hardware Virtualization. GCC- Virtualization: Rajeev Wankar 36

Spring 2017 :: CSE 506. Introduction to. Virtual Machines. Nima Honarmand

Chapter 5 C. Virtual machines

Nested Virtualization and Server Consolidation

COS 318: Operating Systems. Virtual Machine Monitors

Security and Performance Benefits of Virtualization

Xen and the Art of Virtualization. Nikola Gvozdiev Georgian Mihaila

references Virtualization services Topics Virtualization

Xen Automotive Hypervisor Automotive Linux Summit 1-2 July, Tokyo

KVM/ARM. Marc Zyngier LPC 12

Advanced Systems Security: Virtual Machine Systems

Hypervisors on ARM Overview and Design choices

Micro VMMs and Nested Virtualization

Virtualization. Pradipta De

Module 1: Virtualization. Types of Interfaces

Knut Omang Ifi/Oracle 20 Oct, Introduction to virtualization (Virtual machines) Aspects of network virtualization:

IO virtualization. Michael Kagan Mellanox Technologies

I/O and virtualization

Virtual Machines. To do. q VM over time q Implementation methods q Hardware features supporting VM q Next time: Midterm?

BUD17-301: KVM/ARM Nested Virtualization. Christoffer Dall

ARMv8-A Software Development

COMPUTER ARCHITECTURE. Virtualization and Memory Hierarchy

Virtual Machine Security

Data Path acceleration techniques in a NFV world

Xen on ARM. Stefano Stabellini

Advanced Systems Security: Virtual Machine Systems

Using a Separation Kernel to Protect against the Remote Exploitation of Unaltered Passenger Vehicles

A Big Little Hypervisor for IoT Development February 2018

Deflating the hype: Embedded Virtualization in 3 steps

Xen and the Art of Virtualization. CSE-291 (Cloud Computing) Fall 2016

Virtualization. Operating Systems, 2016, Meni Adler, Danny Hendler & Amnon Meisels

LINUX Virtualization. Running other code under LINUX

Virtual Machine Monitors (VMMs) are a hot topic in

Virtualization. Dr. Yingwu Zhu

CSC 5930/9010 Cloud S & P: Virtualization


Hypervisor Part 1- What is a Hypervisor and How Does it Work?

Intel Virtualization Technology Roadmap and VT-d Support in Xen

Originally prepared by Lehigh graduate Greg Bosch; last modified April 2016 by B. Davison

Communication Patterns in Safety Critical Systems for ADAS & Autonomous Vehicles Thorsten Wilmer Tech AD Berlin, 5. March 2018

Virtual Machines Disco and Xen (Lecture 10, cs262a) Ion Stoica & Ali Ghodsi UC Berkeley February 26, 2018

Research about Virtualization of ARM-Based Mobile Smart Devices *

Designing, developing, debugging ARM Cortex-A and Cortex-M heterogeneous multi-processor systems

Björn Döbel. Microkernel-Based Operating Systems. Exercise 3: Virtualization

Virtualization with XEN. Trusted Computing CS599 Spring 2007 Arun Viswanathan University of Southern California

KeyStone II. CorePac Overview

How to Introduce Virtualization in AGL? Objectives, Plans and Targets for AGL EG-VIRT

Scalable and Flexible Software Platforms for High-Performance ECUs. Christoph Dietachmayr Sr. Engineering Manager, Elektrobit November 8, 2018

To EL2, and Beyond! connect.linaro.org. Optimizing the Design and Implementation of KVM/ARM

EC H2020 dredbox: Seminar School at INSA Rennes

Virtual Machines. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

24-vm.txt Mon Nov 21 22:13: Notes on Virtual Machines , Fall 2011 Carnegie Mellon University Randal E. Bryant.

Interaction between AUTOSAR and non-autosar Systems on top of a Hypervisor

Using a Certified Hypervisor to Secure V2X communication

Virtualization. Application Application Application. MCSN - N. Tonellotto - Distributed Enabling Platforms OPERATING SYSTEM OPERATING SYSTEM

CHAPTER 16 - VIRTUAL MACHINES

Knut Omang Ifi/Oracle 6 Nov, 2017

Virtual Leverage: Server Consolidation in Open Source Environments. Margaret Lewis Commercial Software Strategist AMD

ARM processors driving automotive innovation

Virtualization, Xen and Denali

Profiling and Debugging OpenCL Applications with ARM Development Tools. October 2014

10 th AUTOSAR Open Conference

CSCI 8530 Advanced Operating Systems. Part 19 Virtualization

Virtual Machines. Part 2: starting 19 years ago. Operating Systems In Depth IX 1 Copyright 2018 Thomas W. Doeppner. All rights reserved.

Introduction to Virtual Machines. Carl Waldspurger (SB SM 89 PhD 95) VMware R&D

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

Hypervisor security. Evgeny Yakovlev, DEFCON NN, 2017

System Virtual Machines

Intelligent Power Allocation for Consumer & Embedded Thermal Control

evm for Windows* User Manual

EE 660: Computer Architecture Cloud Architecture: Virtualization

Virtual Machine Monitors!

Multiprocessor Scheduling. Multiprocessor Scheduling

Virtualization for Embedded Systems

Xen Project Automotive and Embedded Overview

Operating Systems 4/27/2015

SERVE. -Priyal Lokhandwala

CS370 Operating Systems

Cortex-A15 MPCore Software Development

CSE543 - Computer and Network Security Module: Virtualization

Abstract. Testing Parameters. Introduction. Hardware Platform. Native System

The Price of Safety: Evaluating IOMMU Performance

System-on-Chip Architecture for Mobile Applications. Sabyasachi Dey

Background. IBM sold expensive mainframes to large organizations. Monitor sits between one or more OSes and HW

Transcription:

Silver Bullet of Virtualization. Challenges and Concerns May 27, 2013 v1.0

Agenda Introduction / Motivation Background Use Cases / Scenarios Open Questions / Problems Q & A COGENT EMBEDDED 2

Introduction Who we are, What we do Embedded SW services/solutions company Working with semiconductor vendors (SOC and IP block providers) and OEM/ODMs (industrial, automotive, medical, consumer) Helping to Make Open Source work for You COGENT EMBEDDED 3

Motivation. Why we talk about embedded virtualization Embedded industry is evolving: ARM/Intel domination, multi-core designs, Open Source Complexity of Automotive/Embedded designs is already ahead of mobile Cluster, ADAS, Infotainment Common question from OEM/ODM/Tier-n ARM introduced virtualization extensions. New SOCs coming: Does it solve existing problems? Does it bring new (potential) problems? Where it does not help? COGENT EMBEDDED 4

Can we learn from Desktop / Server virtualization experience? Sandboxing and Containment Efficient resource utilization: Dynamic resource allocation Fine-grained QoS control mechanisms Virtualized I/O (for example Single Root I/O Virtualization SR-IO Ethernet controllers, MR I/O storage devices) Typically deal with loosely-coupled Guest OSes Data-center oriented: Focus on infrastructure and manageability Fast VM migration and disaster recovery High availability requirements All about Watts/Money/Performance COGENT EMBEDDED 5

How Embedded (Automotive) virtualization is different? Static, predictable behavior Fast boot / Instant-on requirements Safety requirements Real-time requirements Certification Power management COGENT EMBEDDED 6

How Embedded (Automotive) virtualization is different? (cont d) Extensive I/O, peripherals Complex multi-core environment FPGAs Limitations external IO, memory, power budget, environmental, lifecycle No common hardware design *) **) COGENT EMBEDDED *) Image ownership and copyrights belong to Intel 7 **) Images ownership and copyrights belong to NVIDIA

Summary ARM is following trend created by Intel/AMD: Virtualization is a de-facto standard in desktop/server Success of cloud technologies ARM, Linaro, third-parties are actively improving KVM, Xen but embedded/automotive virtualization is quite different Is there an alternative for embedded/automotive? Shall we introduce one or contribute to Xen Embedded? Embedded virtualization always been a domain for commercial/third-party solutions What ARMv7 virtualization extensions bring for embedded? Is it a breakthrough or a just a checkbox yet? COGENT EMBEDDED 8

Background. Embedded Virtualization on ARM (until ARMv7 virtualization extensions) Embedded virtualization on ARM: Full virtualization Paravirtualization Full Para User mode Guest (ARM OS) Guest (ARM OS) VM port patch trap call Supervisor mode VMM (Hypervisor) VMM (Hypervisor) COGENT EMBEDDED 9

Paravirtualization on ARM (example) Microkernel (hypervisor) Client/Server architecture, IPC Syscalls redirection Emulated interrupts Linux Kernel Userspace HV port/drivers App(s)/glibc User mode Supervisor mode micro-kernel COGENT EMBEDDED 10

Paravirtualization on ARM (performance) (example) COGENT EMBEDDED 11 *) Tables extracted from Performance Evaluation of Para-virtualization on Modern Mobile Phone Platform. Yang Xu, Felix Bruns, Elizabeth Gonzalez, Shadi Traboulsi, Klaus Mott, Attila Bilgic

Paravirtualization drawbacks. Overheads CPU virtualization overhead (system calls, IPCs) increased amount of context switches I/O virtualization overhead: Direct access to I/O from Guest OS can be dangerous I/O (DMA) can read memory that belongs to a different OS User mode Guest0 RTOS System Server I/O Linux kernel Guest1 Userspace Supervisor mode ukernel COGENT EMBEDDED 12

Paravirtualization drawbacks. Maintenance headache Guest OS (e.g. Linux kernel) fork required: Massive changes when adding new (sub) architecture to Linux kernel Linux community may not like it: Not much advantage of OSS Mainline sync process is tough Hypervisor is a moving target as well: Changes in hypervisor may require changes in Linux port Hypervisor and Linux port are tightly coupled and have to be maintained together COGENT EMBEDDED 13

Paravirtualization advantages Better control over Guest OS: Sandboxing/Containment Resource access is 100% controlled by HV Hypervisor is implemented as pure software (easy to patch, fix, change) Guest OS can be untied from particular hardware COGENT EMBEDDED 14

HW-assisted virtualization. ARM virtualization extensions CPU virtualization: New HYP privilege mode (Non-Secure Privilege Level 2) Instructions that can not be executed natively are trapped into hypervisor. Hypervisor Syndrome Register (HSR) helps to identify entry reason Separate vector table for hypervisor. Hypervisor Vector Base Address Register (HVBAR) Hypervisor Call (HVC) and 0x14 vector Memory virtualization: Intermediate Physical Address 2 stage translation (VA->IPA->PA) Large Physical Address Extension (LPAE) Virtual Machine IDentifier (VMID) (TLB maintenance) COGENT EMBEDDED 15

HW-assisted virtualization. ARM virtualization extensions (cont d) I/O virtualization: Virtual Interrupts. Virtual GIC, Virtual Interrupts Distributor System MMU (x86-world IOMMU) even more flexible (2-stages translations, SMMU repeats MMU tables structure) Is this enough? PCI-SIG Single Root I/O Virtualization Multi-Root I/O Virtualization Desktop/server video cards (do not offer virtual functions, but provide independent hardware queues are controlled via separate register pages) COGENT EMBEDDED 16

Hypervisor enablement (with HW-assisted virtualization) Still a lot of work to do at hypervisor side: Boot/initialization, lifecycle management Resource allocation / management Capabilities / privileges management IPC Scheduling I/O virtualization Power management Guest1 Guest0 GuestN Hypervisor System Server Trust Zone Secure Domain COGENT EMBEDDED 17

Automotive. Real world scenario Graphics SOC *) *) MCU Instrument Cluster ECU MCU IVI SOC Infotainment ECU **) Gateway MCU DSP Vehicle domain Driver assistance ECU COGENT EMBEDDED *) Image ownership and copyrights belong to NVIDIA 18 **) From EE-Times acrticle Magna brings camera-based driver assistance systems to volume markets

Will it evolve in the future?. Giant step in consolidation Cluster Infotainment ADAS System Gateway MCU Hypervisor Super SOC Vehicle domain big.little, GPU, DSPs COGENT EMBEDDED 19

Is it feasible nowadays? Is there enough room to combine IVI, Cluster, Driver Assistance and other functions on a single SOC? Most recent multi-core ARM SOCs seem to have enough CPU, GPU, Memory resources and misc. accelerators Not enough I/O interfaces (need to use companion chips, extenders, etc.) How to share complex IP blocks (GPU, Displays, etc)? COGENT EMBEDDED 20

Potential benefits Hardware Software Lower total BoM Independent partition Space/size, wiring, weight management economy Fast boot, instant-on Power consumption Shut-down, restart, lifecycle Temperature Minimal system can always Less efforts to design and be up and running productize Easy software update and recovery Faster interconnect between domains Can enable variety of automotive OSes simultaneously (including legacy): Linux, QNX, Windows Automotive COGENT EMBEDDED 21

Consolidation. Already happening AMP scenario No shared I/O (except IPC/communication mechanism) Need to add knowledge about each domain Difficult to achieve absolute isolation Complexity of I/O handover from RTOS to Linux (early video/audio) Not efficient resource usage (RTOS may not need power of big ARM core) RTOS Communication ARM11 CAN ARM11 Graphics Linux (SMP) Multimedia ARM11 Multimedia ARM-based SOC COGENT EMBEDDED 22

Now with super SOC. Sharing problem Need to isolate access to critical I/O like clocks, voltages Some I/O blocks may have many instances Difficult to share offload engines, DSPs, GPU May need to share on companion chipsets multiplexing different functions (like PMIC in mobile, hiding controls for audio, touch, USB, power behind I2C) bad scenario May need to share single A15/A7 core? Infotainment ADAS Cluster System A15 cluster A7 cluster GPU DSP Display Video CAN I2C Clocks Voltages ARM-based super SOC COGENT EMBEDDED 23

Virtual I/O complexities HW-assisted virtualization helps to minimize impact on Guest OSes Still need to modify/virtualize Guest on BSP/drivers level Virtual I/O support increases Hypervisor/System Server complexity (Repeating complex OS drivers, sharing/qos/priorities) Can we push I/O virtualization complexity further to hardware IP (like in server world)? Cluster Display2 VGPU System server Display2 Ethernet V I/O Hypervisor Clocks A15 cluster A7 cluster Infotainment ARM-based super SOC COGENT EMBEDDED 24 GPU DSP Voltages Display1 I2C1 VDisplay1 VGPU

I/O Virtualization in Embedded SOC? PCI SR I/O for embedded realistic? Context-aware offload engines. True story COGENT EMBEDDED 25

Sharing ARM cores. Scheduling Not enough ARM cores? Introduce domains priorities, go with traditional full-preemptive, prioritybased scheduling How schedule domains with same priority? Cooperative scheduling dangerous for CPU bound tasks What time-slice granularity to choose? Priority inversion? Are we ready for big.little yet? Trade-off performance, powerconsumption, deterministic behavior Guest0 up Guest1 up Hypervisor Guest2 SMP System Server A15 A15 GPU DSP COGENT EMBEDDED 26

Power Management Guest OS (e.g. Linux) state of art Power Management framework: Static PM: sleep states Dynamic PM: DVFS/CPUFreq, power states, governors, individual peripherals shutdown, CPU hotplug When consolidating multiple Guest OSes need to offload power management heuristic to hypervisor/system Server (no hardware yet with VM-isolated power states) Modify Guest OSes and design Power Management- aware hypervisor COGENT EMBEDDED 27

Summary No silver bullet case by case analysis required May not even have a choice, forced to use it: legacy SW migration, combination of multiple OSes Already deployed embedded ARM paravirtualization solution now can get rid of overheads and simplify design! Good scenarios/use-cases HW-assisted ARM hypervisor fits well: Enhances AMP scenario domain protection/isolation/management, I/O handover between domains Simple, cheap peripherals sharing (or minimal I/O sharing) COGENT EMBEDDED 28

Summary (cont d) More advanced scenarios: Increasing complexity of hypervisor/system Server: I/O sharing, Scheduling, Power Management Embedded SOCs not 100% ready (yet) for efficient I/O virtualization Answer for advanced uses-cases is in hands of SOC/IP block vendors: I/O sharing silicon IP vendors can enhance their products for virtualization scenarios (e.g. GPU, DSP -> multi-context/queue support) SOC vendors can integrate more IP blocks, more cores, more offload engines Trade-offs: saving HW costs by increasing SW design complexity, cost, maintenance headache, time to market COGENT EMBEDDED 29

Summary (cont d) Think about I/O sharing from the beginning: SOCs have MANY offload engines Do you really need GPU/OpenGL for simple bitblit operations Image processing on DSP or GPU? Audio codecs on DSP or ARM? Keep things simple vs trying to be super-flexible : Sharing of single CPU for embedded potentially dangerous scenario Optimistic view: ARM opened door for virtualization SOC/silicon IP vendors are working on efficient solutions: new/better SOCs + optimized sw - coming really soon COGENT EMBEDDED 30

Questions, Comments Questions, Thoughts? Send your questions: hv@cogentembedded.com Thank You! COGENT EMBEDDED 31