Xen on ARM Stefano Stabellini What is Xen? a type-1 hypervisor - - PowerPoint PPT Presentation

xen on arm
SMART_READER_LITE
LIVE PREVIEW

Xen on ARM Stefano Stabellini What is Xen? a type-1 hypervisor - - PowerPoint PPT Presentation

Xen on ARM Stefano Stabellini What is Xen? a type-1 hypervisor small footprint (less than 90K LOC) Xen: Open Source GPLv2 with DCO (like Linux) Diverse contributor community Xen: Open Source source: Mike Day


slide-1
SLIDE 1

Xen on ARM

Stefano Stabellini

slide-2
SLIDE 2

What is Xen?

  • a type-1 hypervisor
  • small footprint (less than 90K LOC)
slide-3
SLIDE 3

Xen: Open Source

GPLv2 with DCO (like Linux) Diverse contributor community

slide-4
SLIDE 4

Xen: Open Source

source: Mike Day http://code.ncultra.org

slide-5
SLIDE 5

Xen: the gears of the cloud

  • large user base

more than 10 million individuals users

  • power the largest clouds in

production

  • not just for servers
slide-6
SLIDE 6

Xen Architecture

Hardware Xen

Dom0 DomU

HW drivers PV backends PV Frontends

DomU

PV Frontends

DomU

PV Frontends

slide-7
SLIDE 7

Xen Architecture: driver domains

Hardware Xen

Dom0 DomU

NetFront

Disk Driver Domain

Toolstack Disk Driver BlockBack

Network Driver Domain

Network Driver NetBack BlockFront

slide-8
SLIDE 8
  • disaggregation and componentization
  • security and isolation
  • resilience
  • hardware vendors can run their drivers in

separate VMs

○ could run in a RTOS environment ○ hidden from the user ■ media codecs, crypto keys, etc.

Xen Architecture: driver domains

slide-9
SLIDE 9

Xen on ARM: not just a port

  • a lean and simple architecture

○ removed cruft accumulated during the years ○ no emulation, no QEMU ○ use PV drivers for IO as early as possible ○ one type of guest ○ exploit the hardware as much as possible

  • a very good match for the hardware
  • clean architecture = small code base
slide-10
SLIDE 10

Xen on ARM architecture

slide-11
SLIDE 11

Xen on ARM architecture

slide-12
SLIDE 12

Code size

sometimes smaller is better

  • X86_64-bit: ~120,000LOC (~4,000 ASM)
  • ARM code ~= 1/10 x86_64 code

Common ARMv7 ARMv8 Total xen/arch/arm 5,122 1,969 821 7,912 C 5,023 406 344 5,773 ASM 99 1,563 477 2,139 xen/include/asm-arm 2,315 563 666 3,544

TOTAL 7,437 2,532 1,487 11,456

slide-13
SLIDE 13

Achievements of one year

11/11 08/12 11/12 03/13 07/13 First Xen on ARM talk at Xen Summit 2012 Xen support for ARM upstream in Linux 3.7 Xen running on real ARM hardware 09/12 Xen 64-bit

  • n ARM64

01/13 Citrix announces that will be joining Linaro Xen support for ARM64 upstream in Linux 3.11 06/13 Xen 4.3 released with ARM and ARM64 support Part-time Xen ARM hacking starts You are here

slide-14
SLIDE 14

Xen-devel ARM traffic from August 2012:

  • 4685 emails: 360 emails per month!
  • 39% of which are not from Citrix

A growing community

slide-15
SLIDE 15

Hardware support

Upstream:

  • Versatile Express Cortex A15
  • Arndale board
  • ARMv8 FVP

In progress:

  • Cubieboard2
  • Calxeda “Midway”
  • Applied Micro “Mustang”
  • Broadcom Brahma-B15
  • OMAP5
slide-16
SLIDE 16

Porting Xen to a new board

  • Xen only relies on GIC and GT
  • platform specific code in Xen is reduced to:

○ secondary cpus bring up ○ UART drivers ○ any platform specific bootup quirks (ideally none)

slide-17
SLIDE 17

Upstream features

Xen v4.3:

  • basic lifecycle operations
  • memory ballooning
  • scheduler configurations and vcpu pinning

Linux v3.11:

  • dom0 and domU support
  • 32-bit and 64-bit support
  • SMP support
  • PV disk, network and console
slide-18
SLIDE 18

Android on Xen on ARM

  • Android is based on the Linux kernel

○ Jelly Bean uses Linux 3.4, when it updates to 3.7 will get Xen on ARM support out of the box

  • Additional work needed to support client

devices (compass, GPS, etc.) on multiple VMs

○ easy to export 1 device to 1 VM ○ otherwise each type of device needs a PV drivers pair

slide-19
SLIDE 19

PV Protocols

Request Producer Request Consumer Response Producer Response Consumer

Backend Frontend

slide-20
SLIDE 20

PV Protocols

  • shared ring protocol
  • software interrupts AKA event channels
  • consensual memory sharing: grant table
  • easy to write
  • plenty of examples

○ network, block, console, PCI, keyboard, mouse, framebuffer, sound, SCSI, USB, …

slide-21
SLIDE 21

Porting other OSes to Xen

  • n ARM
  • No invasive modifications needed
  • only some new drivers:

○ grant table, xenbus and event channels ○ PV drivers for network, block, console, etc.

  • BSD drivers already exist in NetBSD and

FreeBSD, can they be reused?

  • FreeBSD port to Xen on ARM in progress
slide-22
SLIDE 22

Coming in Xen 4.4

  • 64-bit guest support
  • live-migration
  • SWIOTLB
slide-23
SLIDE 23

A look into the future

  • IOMMU support in Xen
  • device assignment
  • UEFI booting
  • ACPI support
slide-24
SLIDE 24

Xen for automotive: why?

  • type-1
  • small footprint

○ small codebase ○ no QEMU, no emulation

  • driver domains / service VMs

○ componentization ○ security ○ support for legacy drivers

  • supports Linux out of the box
  • easy to port other OSes to Xen on ARM
slide-25
SLIDE 25
  • http://www.xenproject.org
  • Xen on ARM @wiki.xenproject.org goo.

gl/FKNXe

  • http://lists.xen.org/mailman/listinfo/xen-devel

More Information

slide-26
SLIDE 26

Questions?

slide-27
SLIDE 27