pub trait KernelLoader {
    // Required method
    fn load<F, M: GuestMemory>(
        guest_mem: &M,
        kernel_offset: Option<GuestAddress>,
        kernel_image: &mut F,
        highmem_start_address: Option<GuestAddress>
    ) -> Result<KernelLoaderResult>
       where F: Read + ReadVolatile + Seek;
}
Expand description

Trait that specifies kernel image loading support.

Required Methods§

source

fn load<F, M: GuestMemory>( guest_mem: &M, kernel_offset: Option<GuestAddress>, kernel_image: &mut F, highmem_start_address: Option<GuestAddress> ) -> Result<KernelLoaderResult>
where F: Read + ReadVolatile + Seek,

How to load a specific kernel image format into the guest memory.

§Arguments
  • guest_mem: GuestMemory to load the kernel in.
  • kernel_offset: Usage varies between implementations.
  • kernel_image: Kernel image to be loaded.
  • highmem_start_address: Address where high memory starts.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl KernelLoader for BzImage

Available on crate feature bzimage and (x86 or x86-64) only.
source§

impl KernelLoader for Elf

Available on crate feature elf and (x86 or x86-64) only.