L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
vmm.lua File Reference

Go to the source code of this file.

Functions

 new_sched (​ prio, ​ cpu_mask, ​ ...)
 start_io (​ busses, ​ cmdline, ​ opts)
 set_sched (​ opts, ​ prio, ​ cpus, ​ ...)
 start_virtio_switch (​ ports, ​ prio, ​ cpus, ​ switch_type, ​ ext_caps)
 start_virtio_switch_tbl (​ options)
 start_vm (​ options)

Function Documentation

◆ new_sched()

new_sched ( prio,
cpu_mask,
​ ...  )

Creates a new scheduler proxy at moe.

Parameters
prioBase priority of the threads running in the scheduler proxy
cpu_maskFirst of a list of CPU masks for the first 64 CPUs to use for the scheduler proxy
...more CPU masks
Returns
created scheduler

◆ set_sched()

set_sched ( opts,
prio,
cpus,
​ ...  )

Create scheduler proxy and add it into the opts table under the key scheduler.

Parameters
[in,out]optsoption table
priothread priority (or nil)
cpuscpu mask (or nil)
...more CPU masks

There are four possibilities for values of prio and cpus:

  • No prio and no cpus: No scheduler proxy created.
  • A prio, but no cpus: Create a scheduler proxy with only a priority limit.
  • No Prio, but cpus: Create a scheduler proxy with default prio and cpus limit.
  • A prio and cpus: Create a scheduler proxy with given limits.

◆ start_io()

start_io ( busses,
cmdline,
opts )

Start IO service with the given options

Parameters
[in,out]bussestable of vBus names as keys. Uses io config <name>.vbus to fill vBus <name>.
cmdlineio command line parameters
optsOption table for loader.start function, e.g. scheduler or ext_caps. Entries from ext_caps have precedence over default caps created by this function.

After this function returns the created vBusses are located in the table passed as busses.

◆ start_virtio_switch()

start_virtio_switch ( ports,
prio,
cpus,
switch_type,
ext_caps )

Start virtio network application.

Deprecated
This function exists for backwards compatiblity reasons and calls start_virtio_switch_tbl with an appropriate options table
Parameters
[in,out]portstable with port names as keys
priopriority for started thread
cpuscpu mask for started thread
switch_typeSelects application to start. Either switch or p2p
ext_capsExtra capabilities to pass to the started application

The switch_type switch can take additional arguments to create a port at the switch. To pass these arguments for a specific port, pass a table as value for a key in the ports table.

◆ start_virtio_switch_tbl()

start_virtio_switch_tbl ( options)

Start virtio network application.

Parameters
optionsA table of parameters

The following keys are supported in the options table:

table key value
ports table with port names as keys
scheduler scheduler (e.g. created with new_sched)
switch_type selects application to start. Either switch or p2p
ext_caps Extra capabilities to pass to the started application
svr_cap cap slot to be used for the server interface
port_limit the maximum number of dynamic ports the switch shall support

The switch_type switch can take additional arguments to create a port at the switch. To pass these arguments for a specific port, pass a table as value for a key in the ports table.

Note
The svr_cap capability requires server rights, use ":svr()".

◆ start_vm()

start_vm ( options)

Start UVMM

Parameters
optionsA table of parameters

The following keys are supported in the options table:

table key value
bootargs command line for guest kernel
cpus cpu mask
ext_args additional arguments to pass to UVMM
fdt file name of the device tree
id an integer identifying the VM
jdb jdb capability
kernel file name of the guest kernel binary
mem RAM size in MiB or dataspace cap for guest memory.
mem_align alignment for the guest memory in bits. Ignored if mem is a cap.
mon monitor application file name
net a virtio cap, e.g. for network
prio thread priority
ram_base start of guest memory
rd file name of the ramdisk
scheduler a scheduler cap. If used, prio and cpus are ignored.
vbus the vBus to attach to the VM