© 2010 VMware Inc. All rights reserved Application-level mobile virtualization Harvey Tuch, Staff Engineer, Mobile Virtualization Platform January 25 th.

Slides:



Advertisements
Similar presentations
Process Description and Control
Advertisements

1
Feichter_DPG-SYKL03_Bild-01. Feichter_DPG-SYKL03_Bild-02.
© 2008 Pearson Addison Wesley. All rights reserved Chapter Seven Costs.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Chapter 1 The Study of Body Function Image PowerPoint
Processes and Operating Systems
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 1 Embedded Computing.
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
Author: Julia Richards and R. Scott Hawley
1 Copyright © 2013 Elsevier Inc. All rights reserved. Appendix 01.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 3 CPUs.
1 Copyright © 2010, Elsevier Inc. All rights Reserved Fig 2.1 Chapter 2.
Properties Use, share, or modify this drill on mathematic properties. There is too much material for a single class, so you’ll have to select for your.
UNITED NATIONS Shipment Details Report – January 2006.
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination. Introduction to the Business.
© 2010 Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of Chapter 11: Structure and Union Types Problem Solving & Program Design.
1 RA I Sub-Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Casablanca, Morocco, 20 – 22 December 2005 Status of observing programmes in RA I.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Properties of Real Numbers CommutativeAssociativeDistributive Identity + × Inverse + ×
Exit a Customer Chapter 8. Exit a Customer 8-2 Objectives Perform exit summary process consisting of the following steps: Review service records Close.
Create an Application Title 1A - Adult Chapter 3.
FACTORING ax2 + bx + c Think “unfoil” Work down, Show all steps.
Year 6 mental test 5 second questions
Year 6 mental test 10 second questions
REVIEW: Arthropod ID. 1. Name the subphylum. 2. Name the subphylum. 3. Name the order.
Debugging operating systems with time-traveling virtual machines Sam King George Dunlap Peter Chen CoVirt Project, University of Michigan.
PP Test Review Sections 6-1 to 6-6
ABC Technology Project
EU market situation for eggs and poultry Management Committee 20 October 2011.
EU Market Situation for Eggs and Poultry Management Committee 21 June 2012.
Project 5: Virtual Memory
Hardware-assisted Virtualization
Chapter 3 Memory Management
2 |SharePoint Saturday New York City
IP Multicast Information management 2 Groep T Leuven – Information department 2/14 Agenda •Why IP Multicast ? •Multicast fundamentals •Intradomain.
Operating Systems Operating Systems - Winter 2011 Dr. Melanie Rieback Design and Implementation.
Operating Systems Operating Systems - Winter 2012 Dr. Melanie Rieback Design and Implementation.
Operating Systems Operating Systems - Winter 2010 Chapter 3 – Input/Output Vrije Universiteit Amsterdam.
VOORBLAD.
Name Convolutional codes Tomashevich Victor. Name- 2 - Introduction Convolutional codes map information to code bits sequentially by convolving a sequence.
1 public class Newton { public static double sqrt(double c) { double epsilon = 1E-15; if (c < 0) return Double.NaN; double t = c; while (Math.abs(t - c/t)
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
Factor P 16 8(8-5ab) 4(d² + 4) 3rs(2r – s) 15cd(1 + 2cd) 8(4a² + 3b²)
Basel-ICU-Journal Challenge18/20/ Basel-ICU-Journal Challenge8/20/2014.
1..
CONTROL VISION Set-up. Step 1 Step 2 Step 3 Step 5 Step 4.
© 2012 National Heart Foundation of Australia. Slide 2.
Understanding Generalist Practice, 5e, Kirst-Ashman/Hull
Executional Architecture
Model and Relationships 6 M 1 M M M M M M M M M M M M M M M M
25 seconds left…...
Januar MDMDFSSMDMDFSSS
Analyzing Genes and Genomes
We will resume in: 25 Minutes.
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
Essential Cell Biology
Intracellular Compartments and Transport
PSSA Preparation.
Essential Cell Biology
1 Chapter 13 Nuclear Magnetic Resonance Spectroscopy.
Energy Generation in Mitochondria and Chlorplasts
Operating System Support for Virtual Machines Samuel T. King, George W. Dunlap,Peter M.Chen Presented By, Rajesh 1 References [1] Virtual Machines: Supporting.
OS Virtualization.
Presentation transcript:

© 2010 VMware Inc. All rights reserved Application-level mobile virtualization Harvey Tuch, Staff Engineer, Mobile Virtualization Platform January 25 th 2012 Sponsored by MIT and VMware Academic Programs VMware: VMware Labs: labs.vmware.com

2 Agenda Mobile hypervisor distribution Virtualization at user-level on Linux Putting it together: Android VMM app Programming exercise

3 Mobile hypervisor distribution

4 Not all mobile hypervisor components can be typically provisioned by app store System software provisioned by OEM and/or carrier Maintenance of baked on bits Time to market (TTM) Market coverage What if we move system (privileged) components to application (user) level? Distribute entire hypervisor like a regular app, via app store Relax distribution constraints Performance, fidelity tradeoffs

5 Mobile hosted architecture Privileged User Host world Guest/monitor world Monitor Guest Kernel modules Host kernel VM control, device backends

6 Deprivileged hosted architecture Privileged User Host world Guest + monitor Host kernel

7 App store distribution constraints Mobile app security models, e.g. Android User-level, deprivileged execution Kernel sandboxing, restricted access to: File system Other applications Services (e.g. SMS, GPS, network) Native components via JNI Unique UID + data directory for each application

8 Agenda Mobile hypervisor distribution Virtualization at user-level on Linux Putting it together: Android VMM app Programming exercise

9 Virtualization at user-level on Linux

10 User-level virtualization Run guest as an application on host OS Guest user ISA runs 1:1 How to handle guest user exceptions? (syscall traps, page faults, etc.) How to execute guest privileged ISA? (e.g. on ARM MSR/MRS/MCR/MRC..) How to map guest adddress space to application address space on host?

11 User-level virtualization Run guest as an application on host OS Guest user ISA runs 1:1 How to handle guest user exceptions? (syscall traps, page faults, etc.) How to execute guest privileged ISA? (e.g. on ARM MSR/MRS/MCR/MRC..) How to map guest adddress space to application address space on host?

12 Guest user ISA runs 1:1

13 Guest user ISA runs 1:1

14 User-level virtualization Run guest as an application on host OS Guest user ISA runs 1:1 How to handle guest user exceptions? (syscall traps, page faults, etc.) How to execute guest privileged ISA? (e.g. on ARM MSR/MRS/MCR/MRC..) How to map guest adddress space to application address space on host?

15 Guest user syscall exception

16 Guest user syscall exception

17 Guest user syscall exception

18 Guest user syscall exception

19 ptrace system call Linux system call allowing one process to control/monitor another Used by gdb, strace Parent can inspect/modify childs: Register file Memory Parent can intercept child signals Exceptions (including syscall traps) reflected in Unix at user-level as signals Parent can single step and inject signals into child

20 ptrace based virtualization Hypervisor thread parent ptrace child thread representing guest Use ptrace : Intercept all signals (exceptions) Intercept system calls Context switch child thread between guest kernel/user Performance penalties Each exception requires switching between guest thread, host kernel, hypervisor thread, host kernel and guest thread ptrace originally only intended for debug, but now optimized to support User- mode Linux (see also Fiasco-UX)

21 ptrace exception handling while (1) { waitpid(guestPID, &status, __WCLONE | WUNTRACED);... struct user_regs regs; ptrace(PTRACE_GETREGS, vmm->currentGuestPID, NULL, &regs); int sig = WSTOPSIG(status); switch (sig) { case SIGTRAP: {... }

22 Guest user syscall exception

23 User-level virtualization Run guest as an application on host OS Guest user ISA runs 1:1 How to handle guest user exceptions? (syscall traps, page faults, etc.) How to execute guest privileged ISA? (e.g. on ARM MSR/MRS/MCR/MRC..) How to map guest adddress space to application address space on host?

24 Guest privileged ISA

25 Guest privileged ISA Sensitive + privileged instructions E.g. MCR/MRC on ARM Trap+emulate with ptrace Sensitive + non-privileged instructions E.g. MSR/MRS on ARM Paravirtualization Hypercall traps to hypervisor parent process via ptrace

26 User-level virtualization Run guest as an application on host OS Guest user ISA runs 1:1 How to handle guest user exceptions? (syscall traps, page faults, etc.) How to execute guest privileged ISA? (e.g. on ARM MSR/MRS/MCR/MRC..) How to map guest adddress space to application address space on host?

27 Guest address space mapping

28 Guest address space mapping

29 Guest address space mapping Reduced guest address space Guest kernel modifications required Guest application visible

30 Agenda Mobile hypervisor distribution Virtualization at user-level on Linux Putting it together: Android VMM app Programming exercise

31 Putting it together: Android VMM app

32 Android.apk anatomy.apk Resources Meta-data CertificatesDEX (Java) Native code (JNI)

33 Android VMM application Java frontend VM lifecycle management Display VM framebuffer contents Touchscreen input Invoke native code via JNI Native code (JNI) ptrace -based VMM Resources Guest kernel + applications (LBS VM image)

34 Agenda Mobile hypervisor distribution Virtualization at user-level on Linux Putting it together: Android VMM app Programming exercise

35 Programming exercise Implement parts of deprivileged mobile hypervisor Context switching Paravirtualized hypercall handling Run on your Android smartphone (or SDK emulator) Complete by 5 th February 2012 to enter draw to win iPad Questions and clarification to: