Xen on ARM Cortex A15Stefano Stabellini
Why?       Why?
smartphones:getting smarterQuad-core1.4 GHzCortex-A9
ARM Servers coming to market4GB RAM, 4 cores per node3 x 6 x 4 x 4 = 288 cores                        single node virtuali...
ChallengesAnother PVOPs infrastructure for ARM inLinux?How would the Linux Community react?
ARMv7 virtualizationextensions to the rescue!"The ARM Architecture virtualization extensionand Large Physical Address Exte...
Design goals● exploit the hardware as much as possible● one type of guest  ○ no PVOPs  ○ use PV interfaces for IO● Rearchi...
One type of guest to rulethem all
One type of guestLike PV guests do it:● support booting from a supplied kernel● no emulated devices● use PV interfaces for...
One type of guestLike HVM guests do it:● no PV MMU calls: exploit HW nested paging● same entry point on native and on Xen●...
Exploit the hardwareExploit the hardware virtualization extensionssupport as much as possible:● hypervisor mode● MMU: seco...
General Interrupt Controlleran interrupt controller with virtualization support● use the GIC to inject hardware interrupts...
The hypercall callingconventionthe hypercall interface:● hvc instruction● hypervisor specific imm 0xEA1● hypercall argumen...
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...
a 64 bit "ready" ABI       make unsigned long and pointers 8    bytes sized and 8 bytes aligned    everywhere
a 64 bit "ready" ABIGuest                                                   8 bytes unsigned long                         ...
a 64 bit "ready" ABIGuest                                                               8 bytes unsigned long             ...
a 64 bit "ready" ABI           make unsigned long and pointers 8        bytes sized and 8 bytes aligned        everywhereC...
Device TreeUse Device Tree to describe the virtual platformhypervisor {     compatible = "xen,xen", "xen,xen-4.2";     reg...
Device TreeUse Device Tree to describe the virtual platform                                  version of the Xen ABIhypervi...
Design goals:did we meet them?● exploit the hardware as much as possible● one type of guest  ○ no PVOPs  ○ use PV interfac...
Design goals:did we meet them?● exploit the hardware as much as possible● one type of guest                               ...
Status of the Project● Xen and Dom0 booting● VM creation and destruction● PV console, disk and network working● Xen ARM pa...
Open Questions: ACPI"Modern PCs are horrible. ACPI is a complete design disaster inevery way. But were kind of stuck with ...
Open Questions: UEFI"EFI is this other [...] brain-damage (the first one being ACPI). "Linus Torvalds● Xen as Portable Exe...
Open Questions:Client Devices● lack of a reference architecture● UEFI Secure Boot● Windows 8
XenSummit NA 2012: Xen on ARM Cortex A15
XenSummit NA 2012: Xen on ARM Cortex A15
XenSummit NA 2012: Xen on ARM Cortex A15
Upcoming SlideShare
Loading in...5
×

XenSummit NA 2012: Xen on ARM Cortex A15

28,404

Published on

During the last few months of 2011 the Xen Community started an effort to port Xen to ARMv7 with virtualization extensions, using the Cortex A15 processor as reference platform.The new Xen port is exploiting this set of hardware capabilities to run guest VMs in the most efficient way possible while keeping the ARM specific changes to the hypervisor and the Linux kernel to a minimum.

Developing the new port we took the chance to remove legacy concepts like PV or HVM guests and only support a single kind of guests that is comparable to "PV on HVM" in the Xen X86 world.

This talk will explain the reason behind this and other design choices that we made during the early development process and it will go through the main technical challenges that we had to solve in order to accomplish our goal.
Notable examples are the way Linux guests issue hypercalls and receive event channels notifications from Xen.

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
28,404
On Slideshare
0
From Embeds
0
Number of Embeds
12
Actions
Shares
0
Downloads
155
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Transcript of "XenSummit NA 2012: Xen on ARM Cortex A15"

  1. 1. Xen on ARM Cortex A15Stefano Stabellini
  2. 2. Why? Why?
  3. 3. smartphones:getting smarterQuad-core1.4 GHzCortex-A9
  4. 4. ARM Servers coming to market4GB RAM, 4 cores per node3 x 6 x 4 x 4 = 288 cores single node virtualization - manageability -
  5. 5. ChallengesAnother PVOPs infrastructure for ARM inLinux?How would the Linux Community react?
  6. 6. ARMv7 virtualizationextensions to the rescue!"The ARM Architecture virtualization extensionand Large Physical Address Extension (LPAE)enable the efficient implementation of virtualmachine hypervisors for ARM architecturecompliant processors."
  7. 7. Design goals● 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
  8. 8. One type of guest to rulethem all
  9. 9. One type of guestLike PV guests do it:● support booting from a supplied kernel● no emulated devices● use PV interfaces for IO no need for QEMU
  10. 10. One type of guestLike 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
  11. 11. Exploit the hardwareExploit the hardware virtualization extensionssupport 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 timer
  12. 12. General Interrupt Controlleran 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● No special Xen entry point● No Xen platform PCI device
  13. 13. The hypercall callingconventionthe hypercall interface:● hvc instruction● hypervisor specific imm 0xEA1● hypercall arguments passed on registers
  14. 14. 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
  15. 15. a 64 bit "ready" ABI make unsigned long and pointers 8 bytes sized and 8 bytes aligned everywhere
  16. 16. a 64 bit "ready" ABIGuest 8 bytes unsigned long 8 bytes aligned --- 8 bytes pointer 8 bytes aligned HVC | r0 | r1 | r2 | r3 | r4 | ... | r12Xen
  17. 17. a 64 bit "ready" ABIGuest 8 bytes unsigned long 8 bytes aligned 32 bit register --- 8 bytes pointer 8 bytes aligned HVC | r0 | r1 | r2 | r3 | r4 | ... | r12Xen XEN_GUEST_HANDLE_PARAM XEN_GUEST_HANDLE
  18. 18. a 64 bit "ready" ABI make unsigned long and pointers 8 bytes sized and 8 bytes aligned everywhereCollateral damage: a 1547 lines patch tos/XEN_GUEST_HANDLE/XEN_GUEST_HANDLE_PARAM/
  19. 19. Device TreeUse Device Tree to describe the virtual platformhypervisor { compatible = "xen,xen", "xen,xen-4.2"; reg = <0xb0000000 0x20000>; interrupts = <1 15 0xf08>;};
  20. 20. Device TreeUse Device Tree to describe the virtual platform version of the Xen ABIhypervisor { compatible = "xen,xen", "xen,xen-4.2"; reg = <0xb0000000 0x20000>; interrupts = <1 15 0xf08>;}; Grant table memory area event notifications IRQ
  21. 21. Design goals:did we meet them?● 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
  22. 22. Design goals:did we meet them?● exploit the hardware as much as possible● one type of guest nested paging in HW, same entry point as nativ ○ no PVOPs no device emulation, use DT to describe the HW ○ use PV interfaces for IO● Rearchitected for the modern age: ○ no QEMU no device emulation, use DT to describe the HW ○ no compat code 64 bit ready ABI ○ no shadow pagetables nested paging in HW
  23. 23. Status of the Project● Xen and Dom0 booting● VM creation and destruction● PV console, disk and network working● Xen ARM patches mostly upstream● Linux Xen ARM patches v3 sent to LKML
  24. 24. Open Questions: ACPI"Modern PCs are horrible. ACPI is a complete design disaster inevery way. But were kind of stuck with it."Linus Torvalds● ACPI? Really??● What about Device Tree?● Do we need an ACPI parser in Xen? drivers/acpi: 110418 lines of code! Equivalent to 38% of the Xen (x86 and ARM) code base!!
  25. 25. Open Questions: UEFI"EFI is this other [...] brain-damage (the first one being ACPI). "Linus Torvalds● Xen as Portable Executable● Grub2 on ARM: multiboot2?● UEFI runtime services ○ PVOPS? Trap and emulate?
  26. 26. Open Questions:Client Devices● lack of a reference architecture● UEFI Secure Boot● Windows 8
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×