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§
Sourcefn load<F, M: GuestMemoryBackend>(
guest_mem: &M,
kernel_offset: Option<GuestAddress>,
kernel_image: &mut F,
highmem_start_address: Option<GuestAddress>,
) -> Result<KernelLoaderResult>
fn load<F, M: GuestMemoryBackend>( 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:GuestMemoryBackendto 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§
impl KernelLoader for BzImage
Available on crate feature
bzimage and (x86 or x86-64) only.impl KernelLoader for Elf
Available on crate feature
elf and (x86 or x86-64) only.