SlideShare una empresa de Scribd logo
1 de 36
Descargar para leer sin conexión
Xen on ARM
Stefano Stabellini and Ian Campbell
Virtualization:
why it matters
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
Xen: Open Source
GPLv2 with DCO (like Linux)
Diverse contributor community
Xen: Open Source
source:
Mike Day
http://code.ncultra.org
Xen Architecture
Hardware
Xen
Dom0 DomU
HW drivers
PV backends PV Frontends
DomU
PV Frontends
DomU
PV Frontends
PV Protocols
Request Producer
Request Consumer
Response Producer
Response
Consumer
Backend Frontend
Xen Architecture:
driver domains
Hardware
Xen
Dom0 DomU
NetFront
Disk Driver
Domain
Toolstack Disk Driver
BlockBack
Network
Driver Domain
Network Driver
NetBack BlockFront
Xen: advantages
● small surface of attack
● isolation
● resilience
● specialized algorithms (scheduler)
Xen Architecture:
HVM guests
Hardware
Xen
Dom0
stubdom
HW drivers
PV backends
HVM DomU
PV Frontends
HVM DomU
QEMU
IO emulation IO emulation
Xen upstream status
● Xen (Dom0 and DomU support, PV
frontends and backends) fully upstream in
Linux since v3.0
A single 3.0.0 Linux kernel image boots on native, on
Xen as domU, as dom0 and PV on HVM guest
● Xen upstream in QEMU since v1.3
● Xen supported by SuSE, Debian, Ubuntu,
Fedora, CentOS, NetBSD and more
ARM Servers
coming to market
4GB RAM, 4 cores per node
3 x 6 x 4 x 4 = 288 cores
single node virtualization -
manageability -
● exploit the hardware as much as possible
● one type of guest
○ no PVOPs
○ use PV interfaces for IO
● Rearchitected for the modern age:
○ no QEMU
○ no compat code
○ no shadow pagetables
Design goals
Xen on ARM architecture
Xen on ARM architecture
Exploit the hardware
Exploit the hardware virtualization extensions
support as much as possible:
● hypervisor mode
● MMU: second stage translation
○ no PV MMU calls: no need for PVOPs
○ no shadow pagetables: -10721 lines of code!!
● hypercall: HVC
● generic timers
General Interrupt Controller
an interrupt controller with virtualization support
● use the GIC to inject hardware interrupts into
dom0
● use the GIC to inject event notifications into
any guest domains with Xen support
○ use PPI 31
○ advertise the IRQ via Device Tree
One type of guest to rule
them all
One type of guest
Like PV guests do it:
● support booting from a supplied kernel
● no emulated devices
● use PV interfaces for IO
no need for QEMU
Like HVM guests do it:
● no PV MMU calls: exploit HW nested paging
● same entry point on native and on Xen
● use Device Tree to discover Xen presence
● no unnecessary devices in the Device Tree
● simple device emulation can be done in Xen
no need for QEMU
One type of guest
Device Tree
Use Device Tree to describe the virtual platform
hypervisor {
compatible = "xen,xen", "xen,xen-4.2";
reg = <0xb0000000 0x20000>;
interrupts = <1 15 0xf08>;
};
Device Tree
Use Device Tree to describe the virtual platform
hypervisor {
compatible = "xen,xen", "xen,xen-4.2";
reg = <0xb0000000 0x20000>;
interrupts = <1 15 0xf08>;
};
event notifications IRQ
Grant table
memory area
version of the Xen ABI
The hypercall calling
convention
the hypercall interface:
● hvc instruction
● hypervisor specific imm 0xEA1
● hypercall arguments passed in registers
a 64 bit "ready" ABI
● a single hypercall ABI for 32 bit guests and
64 bit guests
no compat code in Xen
○ 2600 lines of code lighter
ARMv8
● Builds on foundations laid by ARMv7
○ xen/arch/arm mostly common code
● Initially 32 bit dom0+domU on 64
○ Kernels already ready
○ 64-bit guest support in progress
● Running on AEMv8 model
○ Foundation Model soon
Code size
sometimes smaller is better
● Entire hypervisor ~200,000LOC
○ X86 (64-bit only) ~100,000LOC (~4,000 ASM)
■ ~22,000: HVM. ~14,000 MMU
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
Common Code
mrc p15, 0, r0, c0, c0, 5 => WTF?
xen/include/asm-arm/cpregs.h:
#define __CP32(r, coproc, opc1, crn, crm, opc2) 
coproc, opc1, r, crn, crm, opc2
#define CP32(r, name...) __CP32(r, name)
#define MPIDR p15,0,c0,c0,5
mrc CP32(r0, MPIDR)
Challenges
From the emulator to real hardware:
War Stories Challenges
From the emulator to real hardware:
● barriers and flushes
● cache coherency
● GIC and race conditions
● virt_timer documentation bugs
Status of the Project:
ARMv7
● Xen and Dom0 booting on Versatile Express
Cortex A15 and Arndale
● XL (Xen toolstack) ported to ARM
● PV console, disk and network working
● basic VM lifecycle operations functional
● Xen and Linux ARM patches fully upstream
Status of the Project:
ARMv8
● Xen booting 64 bit
● Dom0 32 bit boots on Xen 64 bit
● 32 bit guest creation and destruction
● Shared code means most features
developed on ARMv7 Just Work
Xen 4.3
○ full ARMv7 support
○ ARMv8 64-bit port of the hypervisor
Xen 4.4
○ increase HCL
○ automated testing
○ ARMv8 64-bit virtual machines and tools
○ PCI passthrough
Linux 3.10/3.11
○ full ARMv8 64-bit Xen guest support
Roadmap
Open Questions
● Boot Protocols
○ Multiboot?
● Bootloaders
○ U-boot
○ UEFI (runtime services?)
● ACPI
○ Argh!
● SysMMU
Demo
Xen and Linaro
Opportunities:
○ testing
○ platform support
○ boot protocols
○ hardware
features
● Talk to us, we are here all week:
○ Xen.org Keynote: Tuesday @ 08:30, Grand Ballroom
○ Xen at Demo Friday
● http://www.xen.org
● Xen on ARM @wiki.xen.org: goo.gl/FKNXe
● http://lists.xen.org/mailman/listinfo/xen-devel
More Information

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Static partitioning virtualization on RISC-V
Static partitioning virtualization on RISC-VStatic partitioning virtualization on RISC-V
Static partitioning virtualization on RISC-V
 
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
OSSJP/ALS19:  The Road to Safety Certification: Overcoming Community Challeng...OSSJP/ALS19:  The Road to Safety Certification: Overcoming Community Challeng...
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
 
Xen Project 15 Years down the Line
Xen Project 15 Years down the LineXen Project 15 Years down the Line
Xen Project 15 Years down the Line
 
GPU Virtualization in Embedded Automotive Solutions
GPU Virtualization in Embedded Automotive SolutionsGPU Virtualization in Embedded Automotive Solutions
GPU Virtualization in Embedded Automotive Solutions
 
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, XilinxXPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
 
Xvisor: embedded and lightweight hypervisor
Xvisor: embedded and lightweight hypervisorXvisor: embedded and lightweight hypervisor
Xvisor: embedded and lightweight hypervisor
 
ELC21: VM-to-VM Communication Mechanisms for Embedded
ELC21: VM-to-VM Communication Mechanisms for EmbeddedELC21: VM-to-VM Communication Mechanisms for Embedded
ELC21: VM-to-VM Communication Mechanisms for Embedded
 
2018 Genivi Xen Overview Nov Update
2018 Genivi Xen Overview Nov Update2018 Genivi Xen Overview Nov Update
2018 Genivi Xen Overview Nov Update
 
Linux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKBLinux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKB
 
Static Partitioning with Xen, LinuxRT, and Zephyr: A Concrete End-to-end Exam...
Static Partitioning with Xen, LinuxRT, and Zephyr: A Concrete End-to-end Exam...Static Partitioning with Xen, LinuxRT, and Zephyr: A Concrete End-to-end Exam...
Static Partitioning with Xen, LinuxRT, and Zephyr: A Concrete End-to-end Exam...
 
System Device Tree and Lopper: Concrete Examples - ELC NA 2022
System Device Tree and Lopper: Concrete Examples - ELC NA 2022System Device Tree and Lopper: Concrete Examples - ELC NA 2022
System Device Tree and Lopper: Concrete Examples - ELC NA 2022
 
OSSNA18: Xen Beginners Training
OSSNA18: Xen Beginners Training OSSNA18: Xen Beginners Training
OSSNA18: Xen Beginners Training
 
ALSS14: Xen Project Automotive Hypervisor (Demo)
ALSS14: Xen Project Automotive Hypervisor (Demo)ALSS14: Xen Project Automotive Hypervisor (Demo)
ALSS14: Xen Project Automotive Hypervisor (Demo)
 
Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)
 
Arm device tree and linux device drivers
Arm device tree and linux device driversArm device tree and linux device drivers
Arm device tree and linux device drivers
 
LFCollab14: Xen vs Xen Automotive
LFCollab14: Xen vs Xen AutomotiveLFCollab14: Xen vs Xen Automotive
LFCollab14: Xen vs Xen Automotive
 
Understanding a kernel oops and a kernel panic
Understanding a kernel oops and a kernel panicUnderstanding a kernel oops and a kernel panic
Understanding a kernel oops and a kernel panic
 
Xen in Safety-Critical Systems - Critical Summit 2022
Xen in Safety-Critical Systems - Critical Summit 2022Xen in Safety-Critical Systems - Critical Summit 2022
Xen in Safety-Critical Systems - Critical Summit 2022
 
LAS16-403: GDB Linux Kernel Awareness
LAS16-403: GDB Linux Kernel AwarenessLAS16-403: GDB Linux Kernel Awareness
LAS16-403: GDB Linux Kernel Awareness
 
XPDDS18: CPUFreq in Xen on ARM - Oleksandr Tyshchenko, EPAM Systems
XPDDS18: CPUFreq in Xen on ARM - Oleksandr Tyshchenko, EPAM SystemsXPDDS18: CPUFreq in Xen on ARM - Oleksandr Tyshchenko, EPAM Systems
XPDDS18: CPUFreq in Xen on ARM - Oleksandr Tyshchenko, EPAM Systems
 

Destacado

BUD17-510: Power management in Linux together with secure firmware
BUD17-510: Power management in Linux together with secure firmwareBUD17-510: Power management in Linux together with secure firmware
BUD17-510: Power management in Linux together with secure firmware
Linaro
 

Destacado (9)

Embedded Systems Conference 2014 Presentation
Embedded Systems Conference 2014 PresentationEmbedded Systems Conference 2014 Presentation
Embedded Systems Conference 2014 Presentation
 
Xen.org Overview 2009
Xen.org Overview 2009Xen.org Overview 2009
Xen.org Overview 2009
 
Embedded Hypervisor for ARM
Embedded Hypervisor for ARMEmbedded Hypervisor for ARM
Embedded Hypervisor for ARM
 
Develop Your Own Operating Systems using Cheap ARM Boards
Develop Your Own Operating Systems using Cheap ARM BoardsDevelop Your Own Operating Systems using Cheap ARM Boards
Develop Your Own Operating Systems using Cheap ARM Boards
 
F9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
F9: A Secure and Efficient Microkernel Built for Deeply Embedded SystemsF9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
F9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
 
오픈스택! 이틀이면할수있다! 시즌2
오픈스택! 이틀이면할수있다! 시즌2오픈스택! 이틀이면할수있다! 시즌2
오픈스택! 이틀이면할수있다! 시즌2
 
BUD17-510: Power management in Linux together with secure firmware
BUD17-510: Power management in Linux together with secure firmwareBUD17-510: Power management in Linux together with secure firmware
BUD17-510: Power management in Linux together with secure firmware
 
Linaro connect : Introduction to Xen on ARM
Linaro connect : Introduction to Xen on ARMLinaro connect : Introduction to Xen on ARM
Linaro connect : Introduction to Xen on ARM
 
Q4.11: ARM Architecture
Q4.11: ARM ArchitectureQ4.11: ARM Architecture
Q4.11: ARM Architecture
 

Similar a LCA13: Xen on ARM

Oscon 2012 : From Datacenter to the Cloud - Featuring Xen and XCP
Oscon 2012 : From Datacenter to the Cloud - Featuring Xen and XCPOscon 2012 : From Datacenter to the Cloud - Featuring Xen and XCP
Oscon 2012 : From Datacenter to the Cloud - Featuring Xen and XCP
The Linux Foundation
 
S4 xen hypervisor_20080622
S4 xen hypervisor_20080622S4 xen hypervisor_20080622
S4 xen hypervisor_20080622
Todd Deshane
 
OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and ...
OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and ...OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and ...
OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and ...
Paris Open Source Summit
 
Xen Euro Par07
Xen Euro Par07Xen Euro Par07
Xen Euro Par07
congvc
 

Similar a LCA13: Xen on ARM (20)

ALSF13: Xen on ARM - Virtualization for the Automotive Industry - Stefano Sta...
ALSF13: Xen on ARM - Virtualization for the Automotive Industry - Stefano Sta...ALSF13: Xen on ARM - Virtualization for the Automotive Industry - Stefano Sta...
ALSF13: Xen on ARM - Virtualization for the Automotive Industry - Stefano Sta...
 
Improving Scalability of Xen: The 3,000 Domains Experiment
Improving Scalability of Xen: The 3,000 Domains ExperimentImproving Scalability of Xen: The 3,000 Domains Experiment
Improving Scalability of Xen: The 3,000 Domains Experiment
 
LCC17 - Securing Embedded Systems with the Hypervisor - Lars Kurth, Citrix
LCC17 - Securing Embedded Systems with the Hypervisor - Lars Kurth, CitrixLCC17 - Securing Embedded Systems with the Hypervisor - Lars Kurth, Citrix
LCC17 - Securing Embedded Systems with the Hypervisor - Lars Kurth, Citrix
 
Qemu device prototyping
Qemu device prototypingQemu device prototyping
Qemu device prototyping
 
XPDDS17: NoXS: Death to the XenStore - Filipe Manco, NEC
XPDDS17:  NoXS: Death to the XenStore - Filipe Manco, NECXPDDS17:  NoXS: Death to the XenStore - Filipe Manco, NEC
XPDDS17: NoXS: Death to the XenStore - Filipe Manco, NEC
 
Xen Debugging
Xen DebuggingXen Debugging
Xen Debugging
 
ACRN vMeet-Up EU 2021 - installation and configuration introduction
ACRN vMeet-Up EU 2021 - installation and configuration introductionACRN vMeet-Up EU 2021 - installation and configuration introduction
ACRN vMeet-Up EU 2021 - installation and configuration introduction
 
XPDDS18: Qemu and Xen: Reducing the attack surface - Paul Durrant, Citrix
XPDDS18: Qemu and Xen: Reducing the attack surface - Paul Durrant, CitrixXPDDS18: Qemu and Xen: Reducing the attack surface - Paul Durrant, Citrix
XPDDS18: Qemu and Xen: Reducing the attack surface - Paul Durrant, Citrix
 
Oscon 2012 : From Datacenter to the Cloud - Featuring Xen and XCP
Oscon 2012 : From Datacenter to the Cloud - Featuring Xen and XCPOscon 2012 : From Datacenter to the Cloud - Featuring Xen and XCP
Oscon 2012 : From Datacenter to the Cloud - Featuring Xen and XCP
 
Container based android
Container based androidContainer based android
Container based android
 
S4 xen hypervisor_20080622
S4 xen hypervisor_20080622S4 xen hypervisor_20080622
S4 xen hypervisor_20080622
 
OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and ...
OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and ...OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and ...
OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and ...
 
Build-a-Cloud Day - Securing Your Cloud with Xen
Build-a-Cloud Day - Securing Your Cloud with XenBuild-a-Cloud Day - Securing Your Cloud with Xen
Build-a-Cloud Day - Securing Your Cloud with Xen
 
Securing Your Cloud With the Xen Hypervisor by Russell Pavlicek
Securing Your Cloud With the Xen Hypervisor by Russell PavlicekSecuring Your Cloud With the Xen Hypervisor by Russell Pavlicek
Securing Your Cloud With the Xen Hypervisor by Russell Pavlicek
 
LFCOLLAB15: Xen 4.5 and Beyond
LFCOLLAB15: Xen 4.5 and BeyondLFCOLLAB15: Xen 4.5 and Beyond
LFCOLLAB15: Xen 4.5 and Beyond
 
Device virtualization and management in xen
Device virtualization and management in xenDevice virtualization and management in xen
Device virtualization and management in xen
 
[Ruxcon] Breaking virtualization by switching the cpu to virtual 8086 mode
[Ruxcon] Breaking virtualization by switching the cpu to virtual 8086 mode[Ruxcon] Breaking virtualization by switching the cpu to virtual 8086 mode
[Ruxcon] Breaking virtualization by switching the cpu to virtual 8086 mode
 
Xen Euro Par07
Xen Euro Par07Xen Euro Par07
Xen Euro Par07
 
CIF16/Scale14x: The latest from the Xen Project (Lars Kurth, Chairman of Xen ...
CIF16/Scale14x: The latest from the Xen Project (Lars Kurth, Chairman of Xen ...CIF16/Scale14x: The latest from the Xen Project (Lars Kurth, Chairman of Xen ...
CIF16/Scale14x: The latest from the Xen Project (Lars Kurth, Chairman of Xen ...
 
SoC Idling for unconf COSCUP 2016
SoC Idling for unconf COSCUP 2016SoC Idling for unconf COSCUP 2016
SoC Idling for unconf COSCUP 2016
 

Más de Linaro

Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea GalloDeep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Linaro
 
HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018
Linaro
 
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Linaro
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Linaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
Linaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
Linaro
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
Linaro
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMU
Linaro
 
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation
Linaro
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted boot
Linaro
 

Más de Linaro (20)

Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea GalloDeep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
 
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta VekariaArm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
 
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua MoraHuawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
 
Bud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qaBud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qa
 
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
 
HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018
 
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
 
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
 
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
 
HKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteHKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening Keynote
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP Workshop
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
 
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allHKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMU
 
HKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MHKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8M
 
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted boot
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

LCA13: Xen on ARM

  • 1. Xen on ARM Stefano Stabellini and Ian Campbell
  • 3. 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
  • 4. Xen: Open Source GPLv2 with DCO (like Linux) Diverse contributor community
  • 5. Xen: Open Source source: Mike Day http://code.ncultra.org
  • 6. Xen Architecture Hardware Xen Dom0 DomU HW drivers PV backends PV Frontends DomU PV Frontends DomU PV Frontends
  • 7. PV Protocols Request Producer Request Consumer Response Producer Response Consumer Backend Frontend
  • 8. Xen Architecture: driver domains Hardware Xen Dom0 DomU NetFront Disk Driver Domain Toolstack Disk Driver BlockBack Network Driver Domain Network Driver NetBack BlockFront
  • 9. Xen: advantages ● small surface of attack ● isolation ● resilience ● specialized algorithms (scheduler)
  • 10. Xen Architecture: HVM guests Hardware Xen Dom0 stubdom HW drivers PV backends HVM DomU PV Frontends HVM DomU QEMU IO emulation IO emulation
  • 11. Xen upstream status ● Xen (Dom0 and DomU support, PV frontends and backends) fully upstream in Linux since v3.0 A single 3.0.0 Linux kernel image boots on native, on Xen as domU, as dom0 and PV on HVM guest ● Xen upstream in QEMU since v1.3 ● Xen supported by SuSE, Debian, Ubuntu, Fedora, CentOS, NetBSD and more
  • 12. ARM Servers coming to market 4GB RAM, 4 cores per node 3 x 6 x 4 x 4 = 288 cores single node virtualization - manageability -
  • 13. ● exploit the hardware as much as possible ● one type of guest ○ no PVOPs ○ use PV interfaces for IO ● Rearchitected for the modern age: ○ no QEMU ○ no compat code ○ no shadow pagetables Design goals
  • 14. Xen on ARM architecture
  • 15. Xen on ARM architecture
  • 16. Exploit the hardware Exploit the hardware virtualization extensions support as much as possible: ● hypervisor mode ● MMU: second stage translation ○ no PV MMU calls: no need for PVOPs ○ no shadow pagetables: -10721 lines of code!! ● hypercall: HVC ● generic timers
  • 17. General Interrupt Controller an interrupt controller with virtualization support ● use the GIC to inject hardware interrupts into dom0 ● use the GIC to inject event notifications into any guest domains with Xen support ○ use PPI 31 ○ advertise the IRQ via Device Tree
  • 18. One type of guest to rule them all
  • 19. One type of guest Like PV guests do it: ● support booting from a supplied kernel ● no emulated devices ● use PV interfaces for IO no need for QEMU
  • 20. Like HVM guests do it: ● no PV MMU calls: exploit HW nested paging ● same entry point on native and on Xen ● use Device Tree to discover Xen presence ● no unnecessary devices in the Device Tree ● simple device emulation can be done in Xen no need for QEMU One type of guest
  • 21. Device Tree Use Device Tree to describe the virtual platform hypervisor { compatible = "xen,xen", "xen,xen-4.2"; reg = <0xb0000000 0x20000>; interrupts = <1 15 0xf08>; };
  • 22. Device Tree Use Device Tree to describe the virtual platform hypervisor { compatible = "xen,xen", "xen,xen-4.2"; reg = <0xb0000000 0x20000>; interrupts = <1 15 0xf08>; }; event notifications IRQ Grant table memory area version of the Xen ABI
  • 23. The hypercall calling convention the hypercall interface: ● hvc instruction ● hypervisor specific imm 0xEA1 ● hypercall arguments passed in registers
  • 24. a 64 bit "ready" ABI ● a single hypercall ABI for 32 bit guests and 64 bit guests no compat code in Xen ○ 2600 lines of code lighter
  • 25. ARMv8 ● Builds on foundations laid by ARMv7 ○ xen/arch/arm mostly common code ● Initially 32 bit dom0+domU on 64 ○ Kernels already ready ○ 64-bit guest support in progress ● Running on AEMv8 model ○ Foundation Model soon
  • 26. Code size sometimes smaller is better ● Entire hypervisor ~200,000LOC ○ X86 (64-bit only) ~100,000LOC (~4,000 ASM) ■ ~22,000: HVM. ~14,000 MMU 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
  • 27. Common Code mrc p15, 0, r0, c0, c0, 5 => WTF? xen/include/asm-arm/cpregs.h: #define __CP32(r, coproc, opc1, crn, crm, opc2) coproc, opc1, r, crn, crm, opc2 #define CP32(r, name...) __CP32(r, name) #define MPIDR p15,0,c0,c0,5 mrc CP32(r0, MPIDR)
  • 28. Challenges From the emulator to real hardware:
  • 29. War Stories Challenges From the emulator to real hardware: ● barriers and flushes ● cache coherency ● GIC and race conditions ● virt_timer documentation bugs
  • 30. Status of the Project: ARMv7 ● Xen and Dom0 booting on Versatile Express Cortex A15 and Arndale ● XL (Xen toolstack) ported to ARM ● PV console, disk and network working ● basic VM lifecycle operations functional ● Xen and Linux ARM patches fully upstream
  • 31. Status of the Project: ARMv8 ● Xen booting 64 bit ● Dom0 32 bit boots on Xen 64 bit ● 32 bit guest creation and destruction ● Shared code means most features developed on ARMv7 Just Work
  • 32. Xen 4.3 ○ full ARMv7 support ○ ARMv8 64-bit port of the hypervisor Xen 4.4 ○ increase HCL ○ automated testing ○ ARMv8 64-bit virtual machines and tools ○ PCI passthrough Linux 3.10/3.11 ○ full ARMv8 64-bit Xen guest support Roadmap
  • 33. Open Questions ● Boot Protocols ○ Multiboot? ● Bootloaders ○ U-boot ○ UEFI (runtime services?) ● ACPI ○ Argh! ● SysMMU
  • 34. Demo
  • 35. Xen and Linaro Opportunities: ○ testing ○ platform support ○ boot protocols ○ hardware features
  • 36. ● Talk to us, we are here all week: ○ Xen.org Keynote: Tuesday @ 08:30, Grand Ballroom ○ Xen at Demo Friday ● http://www.xen.org ● Xen on ARM @wiki.xen.org: goo.gl/FKNXe ● http://lists.xen.org/mailman/listinfo/xen-devel More Information