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§
Sourcefn load<F, M: GuestMemory>(
guest_mem: &M,
kernel_offset: Option<GuestAddress>,
kernel_image: &mut F,
highmem_start_address: Option<GuestAddress>,
) -> Result<KernelLoaderResult>
fn load<F, M: GuestMemory>( guest_mem: &M, kernel_offset: Option<GuestAddress>, kernel_image: &mut F, highmem_start_address: Option<GuestAddress>, ) -> Result<KernelLoaderResult>
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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl KernelLoader for BzImage
Available on (x86 or x86-64) and crate feature
bzimage
only.impl KernelLoader for Elf
Available on (x86 or x86-64) and crate feature
elf
only.