Difference between revisions of "Xen ARM with Virtualization Extensions/FastModels"

From Xen
m
(Updated hypervisor paths)
Line 45: Line 45:
   
 
A model is run using the ''model_shell'' tool, or optionally ''modeldebugger''. To run the model pass the path to the ''cadi_system_Linux64-Release-GCC-4.1.so'' as the first argument and the kernel to run (e.g. the Xen hypervisor) as the second:
 
A model is run using the ''model_shell'' tool, or optionally ''modeldebugger''. To run the model pass the path to the ''cadi_system_Linux64-Release-GCC-4.1.so'' as the first argument and the kernel to run (e.g. the Xen hypervisor) as the second:
model_shell FastModels/FastModelsPortfolio_7.0/examples/RTSM_VE/Build_Cortex-A15x1/Linux64-Release-GCC-4.1/cadi_system_Linux64-Release-GCC-4.1.so xen-unstable.hg/xen/xen
+
model_shell FastModels/FastModelsPortfolio_7.0/examples/RTSM_VE/Build_Cortex-A15x1/Linux64-Release-GCC-4.1/cadi_system_Linux64-Release-GCC-4.1.so xen.git/xen/xen.axp
   
 
This will boot but fail to find the domain 0 kernel, since we haven't provided one. Currently Xen expects to find the kernel at the start of the emulate flash device, you can configure this by setting the ''motherboard.flashloader0.fname'' model paramter using the ''-C'' command line option:
 
This will boot but fail to find the domain 0 kernel, since we haven't provided one. Currently Xen expects to find the kernel at the start of the emulate flash device, you can configure this by setting the ''motherboard.flashloader0.fname'' model paramter using the ''-C'' command line option:
model_shell FastModels/FastModelsPortfolio_7.0/examples/RTSM_VE/Build_Cortex-A15x1/Linux64-Release-GCC-4.1/cadi_system_Linux64-Release-GCC-4.1.so xen-unstable.hg/xen/xen -C motherboard.flashloader0.fname=linux/arch/arm/boot/zImage
+
model_shell FastModels/FastModelsPortfolio_7.0/examples/RTSM_VE/Build_Cortex-A15x1/Linux64-Release-GCC-4.1/cadi_system_Linux64-Release-GCC-4.1.so xen.git/xen/xen.axp -C motherboard.flashloader0.fname=linux/arch/arm/boot/zImage
 
Alternatively you can create params.cfg containing you local parameters:
 
Alternatively you can create params.cfg containing you local parameters:
 
motherboard.flashloader0.fname=linux/arch/arm/boot/zImage
 
motherboard.flashloader0.fname=linux/arch/arm/boot/zImage
 
which you pass to the model using the ''-f'' option:
 
which you pass to the model using the ''-f'' option:
model_shell FastModels/FastModelsPortfolio_7.0/examples/RTSM_VE/Build_Cortex-A15x1/Linux64-Release-GCC-4.1/cadi_system_Linux64-Release-GCC-4.1.so xen-unstable.hg/xen/xen -f params.cfg.
+
model_shell FastModels/FastModelsPortfolio_7.0/examples/RTSM_VE/Build_Cortex-A15x1/Linux64-Release-GCC-4.1/cadi_system_Linux64-Release-GCC-4.1.so xen.git/xen/xen.axp -f params.cfg.
  +
  +
Note that before commit [http://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=47d1a51480ad0f602d747e460d619436c907deea 47d1a51] (xen: arm: make zImage the default target which we install) it was necessary to use <tt>xen.git/xen/xen</tt> instead of <tt>xen.git/xen/xen.axp</tt>.
   
 
When running with the AEM you should also pass some other options to the model. This is best done using the ''-f'' option to pass a file containing the following to ''model_shell'':
 
When running with the AEM you should also pass some other options to the model. This is best done using the ''-f'' option to pass a file containing the following to ''model_shell'':

Revision as of 14:37, 19 July 2013

No hardware currently exists which supports the ARM virtualization extensions and therefore the Xen ARM with Virtualization Extensions port is currently targeting ARM's FastModel emulator.

The primary target is the ARM Envelope Model (AEM) which is only available under license from ARM however we also support the Cortex-A15 model which is available for download from ARM with an evaluation license.

This document will try and guide you through downloading FastModels, building a model and finally running Xen using the model.

Download FastModels & Evaluation License

You can download FastModels and an evaluation license from the ARM Info Center. In order to do so you will need to register. Once you have registered you can navigate via the Support drop-down menu, to Resources, Evaluation Products and finally Fast Models. At this point you will be asked to provide a phone number as well as a host MAC address for licensing purposes, you should enter the MAC address of the machine you intend to run the emulator on. Next you should select the Processor model (select Cortex-A15) and host platform.

At this point your download should begin and you should be shown your license file which you should download and save

Installation

These instructions are based on the FE000-KT-00002-r7p0-40rel0.tgz version of FastModels.

Unpack the tarball and run the setup.bin which is contained. Follow the wizard to install.

Note: if your system is a 64 bit Debian Squeeze you need to install the package ia32-libs to be able to run setup.bin.

Building a model

We use the example models which ship with FastModels.

If you have access to an AEM license then you can/should use FastModels/FastModelsPortfolio_7.0/examples/RTSM_VE/Build_AEMv7A/RTSM_VE_AEMv7A.sgproj. If you have a Cortex-A15 evalaution license then FastModels/FastModelsPortfolio_7.0/examples/RTSM_VE/Build_Cortex-A15x1/RTSM_VE_Cortex-A15x1.sgproj is the one to use.

To start run:

   sgcanvas <SGPROJ>

Using the relevant .sgproj file. sgcanvas will start and load the example model.

At this point you can select your target environment from the Project, Active Configuration menu. Select the environment which best matches your host.

Next click the Build button and the hit yes to save your changes.

At this point sgcanvas will compile your model, which will take a few minutes. The output will be e.g.

   FastModels/FastModelsPortfolio_7.0/examples/RTSM_VE/Build_Cortex-A15x1/Linux64-Release-GCC-4.1/cadi_system_Linux64-Release-GCC-4.1.so

Where FastModels/FastModelsPortfolio_7.0/examples/RTSM_VE/Build_Cortex-A15x1 corresponds to the example project which you built and Linux64-Release-GCC-4.1 corresponds to the Active Configuration which you selected.

Note: if your system is a 64 bit Debian Squeeze you need to install the package xutils-dev to be able to compile your model.

Running a model

This section assumes that you have found and built a suitable Xen hypervisor and Linux domain 0 kernel. Please see Xen ARM with Virtualization Extensions for more detauls on obtaining and building these.

A model is run using the model_shell tool, or optionally modeldebugger. To run the model pass the path to the cadi_system_Linux64-Release-GCC-4.1.so as the first argument and the kernel to run (e.g. the Xen hypervisor) as the second:

   model_shell FastModels/FastModelsPortfolio_7.0/examples/RTSM_VE/Build_Cortex-A15x1/Linux64-Release-GCC-4.1/cadi_system_Linux64-Release-GCC-4.1.so xen.git/xen/xen.axp

This will boot but fail to find the domain 0 kernel, since we haven't provided one. Currently Xen expects to find the kernel at the start of the emulate flash device, you can configure this by setting the motherboard.flashloader0.fname model paramter using the -C command line option:

   model_shell FastModels/FastModelsPortfolio_7.0/examples/RTSM_VE/Build_Cortex-A15x1/Linux64-Release-GCC-4.1/cadi_system_Linux64-Release-GCC-4.1.so xen.git/xen/xen.axp -C motherboard.flashloader0.fname=linux/arch/arm/boot/zImage

Alternatively you can create params.cfg containing you local parameters:

   motherboard.flashloader0.fname=linux/arch/arm/boot/zImage

which you pass to the model using the -f option:

   model_shell FastModels/FastModelsPortfolio_7.0/examples/RTSM_VE/Build_Cortex-A15x1/Linux64-Release-GCC-4.1/cadi_system_Linux64-Release-GCC-4.1.so xen.git/xen/xen.axp -f params.cfg.

Note that before commit 47d1a51 (xen: arm: make zImage the default target which we install) it was necessary to use xen.git/xen/xen instead of xen.git/xen/xen.axp.

When running with the AEM you should also pass some other options to the model. This is best done using the -f option to pass a file containing the following to model_shell:

   cluster.cpuID=0x410fc0f0 
   cluster.multiprocessor_extensions=1 
   cluster.vmsa.separate_tlbs=1 
   cluster.implements_ple_like_a8=0 
   cluster.vmsa.implements_fcse=0 
   cluster.vmsa.main_tlb_size=512 
   cluster.vmsa.main_tlb_lockable_entries=4 
   cluster.vmsa.instruction_tlb_size=32 
   cluster.implements_virtualization=1 
   cluster.implements_lpae=1 
   cluster.use_Cortex-A15_peripherals=1 
   cluster.delayed_CP15_operations=1 
   cluster.num_cores=1 
   cluster.cpu0.implements_fused_mac=1 
   cluster.cpu0.implements_sdiv_udiv=1 
   cluster.cpu0.l1icache-size_bytes=32768 
   cluster.cpu0.l1icache-associativity=2 
   cluster.cpu0.l1icache-linelength_bytes=64 
   cluster.cpu0.l1dcache-size_bytes=32768 
   cluster.cpu0.l1dcache-associativity=2 
   cluster.cpu0.l1dcache-linelength_bytes=64 
   cluster.cpu0.l2dcache-size_bytes=0x00200000 
   cluster.cpu0.l2dcache-associativity=16 
   cluster.cpu0.l2dcache-linelength_bytes=64

This extra configuration is not necessary with the Cortex-A15 model.

Documentation

There is extensive documentation regarding the use of FastModel installed as part of the installation process. Look in FastModels/FastModelsTools_7.0/doc and FastModels/FastModelsPortfolio_7.0/Docs.