Interface boot.h
The libsel4vm boot interface provides us with base abstractions to create, initialise and configure VM and VCPU instances.
Brief content:
Functions:
vm_init(vm, vka, host_simple, host_vspace, io_ops, host_endpoint, name)
Functions
The interface boot.h defines the following functions.
Function vm_init(vm, vka, host_simple, host_vspace, io_ops, host_endpoint, name)
Initialise/Create VM
Parameters:
vm {vm_t *}: Handle to the VM being initialisedvka {vka_t *}: Initialised handle to virtual kernel allocator for seL4 kernel object allocationhost_simple {simple_t *}: Initialised handle to hosts simple environmenthost_vspace {vspace_t}: Initialised handle to hosts vspaceps_io_ops {ps_io_ops_t *}: Initialised handle to platforms io opshost_enpoint {seL4_CPtr}: Host’s endpoint. The library will wait and manage the endpoint when running a VM instancename {const char *}: String used to describe VM. Useful for debugging
Returns:
- 0 on success, otherwise -1 for error
Back to interface description.
Function vm_create_vcpu(vm, priority)
Create a VCPU for a given VM
Parameters:
vm {vm_t *}: A handle to VM being configured with a new vcpupriority {int}: The scheduling priority assigned to the VCPU thread
Returns:
- NULL for error, otherwise pointer to created vm_vcpu_t object
Back to interface description.
Function vm_assign_vcpu_target(vcpu, target_cpu)
Assign a vcpu with logical target cpu to run on
Parameters:
vcpu {vm_vcpu_t *}: A handle to the VCPUtarget {int}: Logical target CPU ID
Returns:
- -1 for error, otherwise 0 for success
Back to interface description.
Back to top.