The first stage in working with KVM on ARM is to get an ARM Fast Models installation, build an A15 model and check you can run it.

Make sure your host system is beefy enough

You'll need an x86 host system with at least 6GB of RAM, and preferably a fast CPU. The models can run on a 32 bit system, but virtualization and KVM testing are likely to push the limits of address space, so it would be more sensible to use a 64 bit host. Since the Fast Models licenses are locked to a particular host you should pick the right one to start with.

Get your Fast Model

For Linaro folk, the process for getting access to the fast model binaries and our licenses for them is described in Process/Flexlm. For KVM you want the "RTSM_A15x124_VE_7.1_6.tgz" prebuilt binaries, or something newer.

Run the built model

You can run the model just by running the RTSM_VE_Cortex-A15x1 executable. This should bring up an X window with some statistics and a count of executed instructions. Of course since we haven't provided the model with an ARM image to run it is just spinning uselessly, but it confirms that you've managed to install the model and set up the license server connection successfully. In the next howto we'll create an ELF file (".axf file") which we can pass to the model.

Configuring the runtime model

There are a lot of runtime configurable parameters. You can list them all (and see the default values) with:

    RTSM_VE_Cortex-A15x1 --list-params

and set them with

    RTSM_VE_Cortex-A15x1 -C parameter=value -C parameter=value ...

These are all documented in the Fast Models manuals, although you may have to dig a little to find them. They should be in the Fast Models Reference Manual in the section for the individual subcomponent whose parameter is being set.

Some useful options:

parameter

default

description

motherboard.mmc.p_mmc_file

mmc.dat

MMCard filename

motherboard.vis.rate_limit-enable

1

rate limiting enable/disable

motherboard.smsc_91c111.enabled

0

Enable ethernet adaptor

motherboard.hostbridge.userNetworking

0

Enable user-mode networking

Rate limiting keeps the model running at no greater than a particular 'real time' rate. Disabling this means it will always run as fast as it possibly can; this is good for being a bit faster at certain things, but on the other hand also means it will use 100% of your host CPU even when the guest is in an idle/halt loop, and can cause problems with code which cares about timing, most notably the 'login:' prompt which will tend to time out before you can enter your password if you have rate limiting disabled. You can also toggle this by clicking the red square below the "Rate limit ON/OFF" label in the visualization window.

We'll be configuring the kernel to use an NFS root setup as that's more convenient for developing, but it is possible to use an MMC card image as the root filesystem, if you pass the image filename via the motherboard.mmc.p_mmc_file parameter.

To enable networking in the model, the simplest configuration is to pass -C motherboard.smsc_91c111.enabled=1 -C motherboard.hostbridge.userNetworking=1. This enables "user-mode" networking, which works without further configuration and without requiring root access; the only problem you are likely to notice is that ping doesn't work. For more complicated setups it is possible to set up a bridge on your Linux host and then configure the model to use it; refer to the documentation if you really must do this.

Next: set up a host kernel and filesystem.

Core/Virtualization/HowTo/Kvm32ModelSetup (last modified 2014-12-07 20:56:18)