blob: 16861e398bc8ce6f06272b23d928b3884036b6ee [file] [log] [blame] [view]
<!--
Copyright 2020, Data61
Commonwealth Scientific and Industrial Research Organisation (CSIRO)
ABN 41 687 119 230.
This software may be distributed and modified according to the terms of
the BSD 2-Clause license. Note that NO WARRANTY is provided.
See "LICENSE_BSD2.txt" for details.
@TAG(DATA61_BSD)
-->
## Interface `vmcall.h`
The x86 vmcall interface provides methods for registering and managing vmcall handlers. These being used
to process x86 guest hypercalls though the vmcall instruction.
### Brief content:
**Functions**:
> [`vm_reg_new_vmcall_handler(vm, func, token)`](#function-vm_reg_new_vmcall_handlervm-func-token)
## Functions
The interface `vmcall.h` defines the following functions.
### Function `vm_reg_new_vmcall_handler(vm, func, token)`
Register a new vmcall handler. The being hypercalls invoked by the
guest through the vmcall instruction.
This being matched with the value found in the vcpu EAX register on a vmcall exception
**Parameters:**
- `vm {vm_t *}`: A handle to the VM
- `func {vmcall_handler}`: A handler function for the given vmcall being registered
- `token {int}`: A token to associate with a vmcall handler.
**Returns:**
- 0 on success, -1 on error
Back to [interface description](#module-vmcallh).
Back to [top](#).