guest_image.h
The guest image interface provides general utilites to load guest vm images (e.g. kernel, initrd, modules). This interface probably stops being relevant/useful after we start running a VM instance.
Functions:
vm_load_guest_kernel(vm, kernel_name, load_address, alignment, guest_kernel_image)
vm_load_guest_module(vm, module_name, load_address, alignment, guest_image)
Structs:
The interface guest_image.h
defines the following functions.
vm_load_guest_kernel(vm, kernel_name, load_address, alignment, guest_kernel_image)
Load guest kernel image
Parameters:
vm {vm_t *}
: Handle to the VMkernel_name {const char *}
: Name of the kernel imageload_address {uintptr_t}
: Address to load guest kernel image atalignment {size_t}
: Alignment for loading kernel imageguest_kernel_image {guest_kernel_image_t *}
: Handle to information regarding the resulted loading of the guest kernel imageReturns:
Back to interface description.
vm_load_guest_module(vm, module_name, load_address, alignment, guest_image)
Load guest kernel module e.g. initrd
Parameters:
vm {vm_t *}
: Handle to the VMmodule_name {const char *}
: Name of the module imageload_address {uintptr_t}
: Address to load guest kernel image atalignment {size_t}
: Alignment for loading module imageguest_image {guest_image_t *}
: Handle to information regarding the resulted loading of the guest module imageReturns:
Back to interface description.
The interface guest_image.h
defines the following structs.
guest_image
General datastructure for managing a guest image
Elements:
load_paddr {uintptr_t}
: Base address (in guest physical) where the image was loadedalignment {size_t}
: Alignment we used when loading the imagesize {size_t}
: Size of guest imageBack to interface description.
guest_kernel_image
Stores information about the guest kernel image we are loading.
Elements:
kernel_image {guest_image_t}
: Datastructure referring to guest kernel imagekernel_image_arch {guest_kernel_image_arch_t}
: Architecture specific information for loaded guest imageBack to interface description.
Back to top.