module Virt_mem_types:Common types.sig..end
typeksym =string
module Ksymmap:sig..end
typeksymmap =Virt_mem_mmap.addr Ksymmap.t
The kimage structure captures everything known about a kernel
image, including the source domain details, kernel address, kernel
symbols, kernel memory map, and all the kernel structures parsed
out of the memory map.
type utsname = {
|
uts_kernel_name : |
|
uts_nodename : |
|
uts_kernel_release : |
|
uts_kernel_version : |
|
uts_machine : |
|
uts_domainname : |
type kimage = {
|
dom : |
(* | Domain, if known. | *) |
|
domname : |
(* | Domain name. | *) |
|
arch : |
(* | Architecture, eg. i386. | *) |
|
kernel_min : |
(* | Minimum addr of kernel pointers. | *) |
|
kernel_max : |
(* | Maximum addr of kernel pointers. | *) |
|
mem : |
(* | Memory map. | *) |
|
addrmap : |
(* | Parsed kernel structures. | *) |
|
ksyms : |
(* | Kernel symbol table | *) |
|
have_ksyms : |
(* | True if we were able to load the kernel symbols. | *) |
|
have_kallsyms : |
(* | True if we were able to load the kallsyms from the kernel. | *) |
|
utsname : |
(* | Kernel version, if we were able to find it. | *) |
|
have_tasks : |
(* | True if we were able to load the kernel task_struct list. | *) |
|
have_net_devices : |
(* | True if we were able to load the kernel net_device structures. | *) |
type load_memory_error =
| |
AddressOutOfRange |
(* | Address not in kernel_min..kernel_max | *) |
| |
DomIsNull |
(* | kimage.dom = None | *) |
exception LoadMemoryError of load_memory_error * string
val load_memory : kimage -> Virt_mem_mmap.addr -> int -> kimageload_memory img start size tries to load size bytes from
the start address into the memory map. If the memory was loaded
previously, then it is not requested again.
Note that the memory map may be updated by this, so a modified image structure is returned.
This function can raise many different sorts of exceptions and
the caller is advised to catch any exceptions and deal with them
appropriately.
val load_static_memory : dom:Libvirt.ro Libvirt.Domain.t ->
domname:string ->
arch:Virt_mem_utils.architecture ->
wordsize:Virt_mem_utils.wordsize ->
endian:Bitstring.endian ->
kernel_min:Virt_mem_mmap.addr ->
kernel_max:Virt_mem_mmap.addr ->
Virt_mem_mmap.addr -> int -> kimageload_static_memory ~dom (*...*) start size creates a kimage
object, and initializes it with static kernel memory loaded
from the start address and size of dom.
See also Virt_mem_types.load_memory for exceptions this can raise.