Skip to main content

KernelLoader

Trait KernelLoader 

Source
pub trait KernelLoader {
    // Required method
    fn load<F, M: GuestMemoryBackend>(
        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: GuestMemoryBackend>( 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: GuestMemoryBackend 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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

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.