Difference between revisions of "Xen ARM with Virtualization Extensions"

From Xen
(Point to xen-unstable.)
(Update references to which branches to use.)
Line 28: Line 28:
 
:A [[device tree]] in the flat device tree format (.dtb). The device tree source for the AEM is here: [http://xenbits.xen.org/gitweb/?p=people/dvrabel/device-trees.git;a=summary git://xenbits.xen.org/people/dvrabel/device-trees.git].
 
:A [[device tree]] in the flat device tree format (.dtb). The device tree source for the AEM is here: [http://xenbits.xen.org/gitweb/?p=people/dvrabel/device-trees.git;a=summary git://xenbits.xen.org/people/dvrabel/device-trees.git].
 
;Xen
 
;Xen
: All current work is now merged into the current development branch [http://xenbits.xen.org/hg/xen-unstable.hg] or [http://xenbits.xen.org/gitweb/?p=xen.git;a=summary].
+
:All current work is now merged into the current development branch [http://xenbits.xen.org/hg/xen-unstable.hg] or [http://xenbits.xen.org/gitweb/?p=xen.git;a=summary]. It is recommended to use the latest xen-unstable commit.
 
;Linux kernel for dom0
 
;Linux kernel for dom0
:3.5-rc7-arm-2 branch of [http://xenbits.xen.org/gitweb/?p=people/sstabellini/linux-pvhvm.git;a=shortlog;h=refs/heads/3.5-rc7-arm-2| git://xenbits.xen.org/people/sstabellini/linux-pvhvm.git]
+
:The patches necessary to boot Linux as dom0 under Xen were merged upstream in v3.7. However in order to actually start guests a few additional patches are required. These patches can be found in the ''arm-privcmd-for-3.8'' branch of [http://xenbits.xen.org/gitweb/?p=people/ianc/linux.git;a=shortlog;h=refs/heads/arm-privcmd-for-3.8 git://xenbits.xen.org/people/ianc/linux.git]
 
;dom0 userspace
 
;dom0 userspace
  +
:The developers are using the armhf port of Debian Wheezy (which is currently the ''testing'' release).
:(more details here)
 
  +
;domU kernel
;Hypervisor
 
  +
:The patches necessary to boot Linux as a guest under Xen were merged upstream in v3.7.
   
 
=== ABI Compatibility ===
 
=== ABI Compatibility ===
   
  +
The ABI for Xen on ARM is currently not set in stone. The branches and trees referenced above are self consistent.
Xen commit 25024:b8a5e8100c5d and later requires at least commit ef9437e20b9e549282a4602f1187023e4ad2c697 from dvrabel/linux.git#vexpress-dt. Older hypervisors require a Linux version before that (i.e. you must have either both patches or neither).
 
   
 
== Device Trees ==
 
== Device Trees ==

Revision as of 10:55, 3 December 2012

The ARM v7-A architecture includes the optional virtualization extensions that allow a hypervisor to manage fully hardware virtualized guests. These extensions will be available in some ARM Cortex A15 and Cortex A7 processors.

Status

This port is a work-in-progress. Xen and Dom0 boot on the Versatile Express Cortex A15 emulator and an unprivileged guest can be created using the tool xcbuild.

Guest ABI

The guest (including dom0) visible ABI exposed by the hypervisor is not yet set in stone and there may be changes as work progresses. See requirements (below) for specific details of matching kernel and hypervisor versions.

Contributing

Please email xen-devel with comments, questions and patches. Please see the list info page for subscription information and the archives. For patches please see Submitting Xen Patches.

Hardware

Currently there are no processors available which implement the virtualisation extensions. Therefore we are currently targetting the Real-time System Model's provided by ARM. See Xen ARMv7 with Virtualization Extensions/FastModels for more information on obtaining and building the necessary model.

Requirements

ARM Fast Model
Either the v7-A ARM Envelope Model (AEM) or the Cortex A15/A7 models (single CPU only).
Device Tree
A device tree in the flat device tree format (.dtb). The device tree source for the AEM is here: git://xenbits.xen.org/people/dvrabel/device-trees.git.
Xen
All current work is now merged into the current development branch [1] or [2]. It is recommended to use the latest xen-unstable commit.
Linux kernel for dom0
The patches necessary to boot Linux as dom0 under Xen were merged upstream in v3.7. However in order to actually start guests a few additional patches are required. These patches can be found in the arm-privcmd-for-3.8 branch of git://xenbits.xen.org/people/ianc/linux.git
dom0 userspace
The developers are using the armhf port of Debian Wheezy (which is currently the testing release).
domU kernel
The patches necessary to boot Linux as a guest under Xen were merged upstream in v3.7.

ABI Compatibility

The ABI for Xen on ARM is currently not set in stone. The branches and trees referenced above are self consistent.

Device Trees

Xen needs the device trees to be in the flat device tree format (the device tree blob or DTB). This is built by the device tree compiler (dtc) from the device tree source files (.dts and .dtsi.

Version 1.3 or later of dtc is required.

Build the .dtb files with make.

A pre-built vexpress-v2p-aem-v7a.dtb.

Xen

When running on the model there is no bootloader to provide the DTB. Instead, it is linked with the xen image.

The DTB to use is specified by the CONFIG_DTB_FILE config variable which should be set to the absolute path of the DTB. This variable may be set in .config or on the make command line.

The Xen command line may be set with the bootargs parameter of the chosen node of the device tree.

Dom0 kernel

Enable at least ARCH_VEXPRESS, ARCH_VEXPRESS_DT. Disable SPARSE_IRQ (it doesn't play nicely with device tree support). If ARM_APPENDED_DTB is enabled then any appended DTB will be used instead of one supplied by Xen and the kernel will crash unless the memory in the DTB matches that location/size supplied by Xen.

A working configuration is available here.

The Linux command line should be set with the xen,dom0-bootargs parameter of the chosen node of the device tree supplied to Xen. If this parameter is missing then Linux will not get a command line and the wrong console will be used (there's a bug where the kernel doesn't use the default, built-in command line if the /chosen node is missing.

Flash Image

The dom0 kernel is loaded by Xen from the beginning of the flash.

Native boot

To boot the kernel natively use an updated boot-wrapper from git://xenbits.xen.org/people/dvrabel/boot-wrapper.git.

Build the device tree blobs provided with the kernel with make dtbs. A suitable DTB file for the envelope model is vexpress-v2p-aem-v7a.dtb.

For a native boot the kernel should have ARM_APPENDED_DTB and ARM_ATAG_DTB_COMPAT enabled. The kernel zImage and the DTB should be appended. e.g., cat zImage vexpress-v2p-aem-v7a.dtb > image.bin.

Developer FAQs

Use the Xen ARMv7 Dev FAQ page to cover commonly asked questions.