Function load_static_elf

Source
pub fn load_static_elf<F, R: GuestArch>(
    importer: &mut dyn ImageLoad<R>,
    kernel_image: &mut F,
    start_address: u64,
    load_offset: u64,
    assume_pic: bool,
    acceptance: BootPageAcceptance,
    tag: &str,
) -> Result<LoadInfo>
where F: Read + Seek,
Expand description

Loads a kernel from a vmlinux elf image to a slice

ยงArguments

  • guest_mem - The guest memory region the kernel is written to.
  • kernel_image - Input vmlinux image.
  • start_address - For x86_64, this is the start of the high memory. Kernel should reside above it.
  • load_offset - The offset to add to each loaded address.
  • assume_pic - Assume that the image contains Position-Independent Code.
  • acceptance - The page acceptance type for pages in the kernel.
  • tag - The tag used to report igvm imports.

Returns (minimum offset written, maximum offset written, entry address of the kernel).