Xen has been very successful on servers, and yet there are substantial areas where Xen can evolve further. In this talk Jun will discuss a compelling area where the Xen technologies can be applied to -- Mobile virtualization. Using Android as an example, the talk will explore two types of usage models, 1) Android as a guest, 2) Android as the host, showing the benefits of using the Xen technologies.
3. Agenda
Ÿ Mobile Virtualization
Ÿ PC/Server vs. Mobile device virtualization
Ÿ Example: Android™ Virtualization
Ÿ Advantages of Xen Technologies and
Opportunities
Ÿ Xen-Based Android* Architecture
Ÿ Innovation/Research Required for Xen Mobile
Virtualization
XenSummit Asia 2011 *: Simply Android for Android™ hereafter
3
4. What’s Mobile Virtualization?
Ÿ Virtualization of mobile platforms
– E.g. Android as a guest on laptop, desktop, cloud…
– BlueStacks*, Android Emulator
Ÿ Virtualization on mobile platforms
– E.g. Android as the host such as smartphone, tablet
– Red Bend*, Mobile Virtual Platform* (VMware*),
Motorola Atrix 4G*
Ÿ Combination
– E.g. Android guest on Android host
XenSummit Asia 2011
4
5. Why Mobile Virtualization?
Ÿ Many devices and many reasons
– Dual personality (business, personal)
– Multiple OS (e.g. Android + Windows*)
– Security enhancements
– “Secure Xen on ARM” (Samsung*)
– Reusing existing software stacks
Ÿ Potential drawbacks
– Virtualization overhead affecting performance and power,
higher latency
– Extra efforts to rebase, certify
– More complex
XenSummit Asia 2011
5
6. PC/Server vs. Mobile Device
Virtualization
Ÿ Typical VMMs virtualize PC/servers
– No mobile devices support, such as GPS, accelerometer,
gyroscope, touch screen, telephony, etc.
– No skin support.
– Qemu has some mobile devices support
XenSummit Asia 2011
6
7. Example: Android Virtualization
Ÿ Android Emulator in Android SDK
– Android-specific modifications to qemu
– Framebuffer, sound, tty, serial, MMC, NAND, etc.
– Software emulation for ARM and x86
– Emulator with hardware-assist (e.g. Intel® VT) for x86
– KVM on Linux* today (about 10x faster). Available
since SDK Tools Revision 12**.
– Porting to Xen should be easy
– GLES H/W acceleration(via qemu_pipe)
Ÿ Android Guest
– Linux (“Goldfish” kernel) + PV devices
**: http://developer.android.com/sdk/tools-notes.html
XenSummit Asia 2011
7
8. Opportunities for Xen
Ÿ Goldfish kernel
– 32-bit UP HVM Linux kernel (2.6.29 as of today)
– Works well for SDK environment, Save/Restore feature.
– Can be very expensive on mobile devices
Ÿ Xen PV
– PVOPS kernel: lower virtualization overhead and/or
eliminate need for hardware-assisted virtualization
– No qemu: frontends for mobile devices to avoid
dependency on qemu
Ÿ Live migration
– Example: Between laptop and cloud
XenSummit Asia 2011
8
9. Hypervisor Architecture Considerations
Type 1: Bare metal Hypervisor Type 2: OS ‘Hosted’
A pure Hypervisor that runs directly on A Hypervisor that runs within a Host OS
the hardware and hosts Guest OS’s. and hosts Guest OS’s inside of it, using the
host OS services to provide the virtual
environment.
VMn
User-level VMM VMn
VM1
VM0
VM0 Device
User Models
Apps Guest OS
Guest OS and Apps
and Apps
Host OS
Hypervisor Device Ring-0 VM Monitor
Device Drivers / Models Drivers Kernel
Scheduler MMU
Host HW Host HW
Memory CPUs I/O Memory CPUs I/O
XenSummit Asia 2011 isola,on
+
Provides
par,,on
Low
cost,
no
addi,onal
drivers
reliability,
higher
security
Other names and brands may be claimed as the property of others.
10. More Opportunities − Architectural
Advantage of Xen
Ÿ Thin hypervisor
VMn – Open source
Domain 0
VM1 – Proprietary code in guests
High-level Monitor VM0
Device
Models Guest OS
Ÿ Use Linux in upstream
and Apps
Linux – Take full advantage of PV
– PV on HVM
Device Models Xen Hypervisor
(Timer, Interrupt) – No additional device
drivers (Linux 3.x dom0)
Memory CPUs
Host HW Ÿ Use hardware assistance
I/O
for unmodified guests
Hybrid Architecture
XenSummit Asia 2011
10
11. Xen-Based Android w/o HVM
Domain 0 Domain 1 Domain N
Guest Control App
Host Guest *OS
Libxenlingh/Bionic (libc)
Linux PVOPS Kernel Linux PVOPS Kernel
Native Device Backend Virtual Frontend Virtual
Drivers driver Drivers
Callback / Hypercall
Xen Hypervisor Event channel
Physical Host Hardware
XenSummit Asia 2011
11
13. Innovation/Research Required for
Xen Mobile Virtualization
Ÿ Power management
– Optimized for mobile devices
Ÿ Realtime
– RTOS guests support
Ÿ Security
Ÿ Mobile device virtualization
XenSummit Asia 2011
13
14. Conclusion
Ÿ Mobile virtualization will be more important
Ÿ Xen has unique advantages there
– Thin hypervisor, driving innovations for virtualization
– Keeping PVOPS for dom0 in Linux upstream is key
Ÿ Proposed Xen-based Android system
Ÿ Let’s get started!
XenSummit Asia 2011
14