VM library (libsel4vm)
A guest hardware virtualisation library for IA32 and ARM (AArch32 & AArch64) for use on seL4-based systems. The library as such is not specific to CAmkES, but the main users of this library are the CAmkES VMs on x86 and Arm.
This is a consolidated library composed of the now deprecated libraries
libsel4vmm
(x86) and libsel4arm-vmm
(Arm).
Sources: https://github.com/seL4/seL4_projects_libs/blob/master/libsel4vm/
Features
The library supports IRQ Controller emulation (GICv2 on AArch32 and AArch64, and PIC & LAPIC on IA32), guest VM memory management, guest VCPU fault and context management, as well as VM runtime management.
The Arm library has SMP support for GICv2 platforms, the IA32 library provides an IOPort fault registration handler and a VMCall handler registration interface.
API documentation
See below for usage documentation on libsel4vm
.
Common Interfaces
- sel4vm/boot.h: An interface for creating, initialising and configuring VM instances
- sel4vm/guest_irq_controller.h: Abstractions around initialising a guest VM IRQ controller
- sel4vm/guest_memory_helpers.h: Helpers for using the guest memory interface
- sel4vm/guest_vcpu_fault.h: Useful methods to query and configure vcpu objects that have faulted during execution
- sel4vm/guest_vm.h: Provides base definitions of the guest vm datastructure and primitives to run the VM instance
- sel4vm/guest_iospace.h: Enables the registration and management of a guest VM’s IO Space
- sel4vm/guest_memory.h: Useful abstractions to manage your guest VM’s physical address space
- sel4vm/guest_ram.h: A set of methods to manage, register, allocate and copy to/from a guest VM’s RAM
- sel4vm/guest_vm_util.h: A set of utilties to query a guest vm instance
Architecture Specific Interfaces
ARM
- sel4vm/arch/guest_arm_context.h: Provides a set of useful getters and setters on ARM vcpu thread contexts
- sel4vm/arch/guest_vm_arch.h: Provide definitions of the arm guest vm datastructures and primitives to configure the VM instance
X86
- sel4vm/arch/guest_x86_context.h: Provides a set of useful getters and setters on x86 vcpu thread contexts
- sel4vm/arch/guest_vm_arch.h: Provide definitions of the x86 guest vm datastructures and primitives to configure the VM instance
- sel4vm/arch/vmcall.h: Methods for registering and managing vmcall instruction handlers
- sel4vm/arch/ioports.h: Abstractions for initialising, registering and handling ioport events