Interface guest_reboot.h
The guest reboot interface provides a series of helpers for registering callbacks when rebooting the VMM. This interface giving various VMM components and drivers the ability to reset necessary state on a reboot.
Brief content:
Functions:
Structs:
Functions
The interface guest_reboot.h defines the following functions.
Function vmm_init_reboot_hooks_list(rb_hooks_list)
Initialise state of a given reboot hooks list
Parameters:
rb_hooks_list {reboot_hooks_list_t *}: Handle to reboot hooks list
Returns:
- 0 for success, otherwise -1 for error
Back to interface description.
Function vmm_register_reboot_callback(rb_hooks_list, hook, token)
Register a reboot callback within a given reboot hooks list
Parameters:
rb_hooks_list {reboot_hooks_list_t *}: Handle to reboot hooks listhook {rb_hook_fn}: Reboot callback to be invoked when list is processedtoken {void *}: Cookie passed to reboot callback when invoked
Returns:
- 0 for success, otherwise -1 for error
Back to interface description.
Function vmm_process_reboot_callbacks(vm, rb_hooks_list)
Process the reboot hooks registered in a reboot hooks list
Parameters:
vm {vm_t *}: Handle to vm - passed onto reboot callbackrb_hooks_list {reboot_hooks_list_t *}: Handle to reboot hooks list
Returns:
- 0 for success, otherwise -1 for error
Back to interface description.
Structs
The interface guest_reboot.h defines the following structs.
Struct reboot_hook
Datastructure representing a reboot hook, containing a callback function to invoke when processing the hook
Elements:
fn {reboot_hook_fn}: Function pointer to reboot callbacktoken {void *}: Cookie passed to reboot callback when invoked
Back to interface description.
Struct reboot_hooks_list
Reboot hooks management datastructure. Contains a list of reboot hooks that a VMM registers
Elements:
rb_hooks {reboot_hook_t *}: List of reboot hooksnhooks {size_t}: Number of reboot hooks inrb_hooksmember
Back to interface description.
Back to top.