cross_vm_connection.hThe crossvm connection module facilitates the creation of communication channels between VM's and other components on a seL4-based system. The module exports registered cross vm connections to a Linux VM such that processes can access them from userlevel. This being facilitated over a virtual PCI device.
Functions:
Structs:
The interface cross_vm_connection.h defines the following functions.
cross_vm_connections_init_common(vm, connection_base_addr, connections, num_connections, pci, alloc_irq)Install a set of cross vm connections into a guest VM (for either x86 or ARM VM platforms) for the crossvm connectors PCI device
Parameters:
vm {vm_t *}: A handle to the VMconnection_base_addr {uintptr_t}: The base guest physical address that can be used to reserve memoryconnections {crossvm_handle_t *}: The set of crossvm connections to be initialised and installed in the guestnum_connection {int}: The number of connections passed in through the ‘connections’ parameterpci {vmm_pci_space_t *}: A handle to the VM's host PCI device. The connections are advertised through thealloc_irq {alloc_free_interrupt_fn}: A function that is used to allocated an irq number for the crossvm connectionsReturns:
Back to interface description.
consume_connection_event(vm, event_id, inject_irq)Handler to consume a cross vm connection event. This being called by the VMM when it recieves a notification from an external process. The event is then relayed onto the VM.
Parameters:
vm {vm_t *}: A handle to the VMevent_id {seL4_Word}: The id that corresponds to the occuring eventinject_irq {bool}: Whether to inject an interrupt into the VMReturns:
No return
Back to interface description.
The interface cross_vm_connection.h defines the following structs.
crossvm_dataport_handleDatastructure representing a dataport of a crossvm connection
Elements:
size {size_t}: The size of the crossvm dataportnum_frames {int}: Total number of frames in the frames memberframes {seL4_CPtr *}: The set of frames backing the dataportBack to interface description.
crossvm_handleDatastructure representing a single crossvm connection This is matched on when invoking consume_connection_event
Elements:
dataport {crossvm_dataport_handle_t *}: The dataport associated with the crossvm connectionemit_fn {emit_fn}: The function pointer to the crossvm emit methodconsume_id {seL4_Word}: The identifier used for the crossvm connection when receiving incoming notificationsBack to interface description.
Back to top.