IgvmfilegenRegister

Trait IgvmfilegenRegister 

Source
pub(crate) trait IgvmfilegenRegister: IgvmLoaderRegister + 'static {
    // Required methods
    fn load_uefi(
        importer: &mut dyn ImageLoad<Self>,
        image: &[u8],
        config: ConfigType,
    ) -> Result<LoadInfo, Error>;
    fn load_linux_kernel_and_initrd<F>(
        importer: &mut impl ImageLoad<Self>,
        kernel_image: &mut F,
        kernel_minimum_start_address: u64,
        initrd: Option<InitrdConfig<'_>>,
        device_tree_blob: Option<&[u8]>,
    ) -> Result<LoadInfo, Error>
       where F: Read + Seek,
             Self: GuestArch;
    fn load_openhcl<F>(
        importer: &mut dyn ImageLoad<Self>,
        kernel_image: &mut F,
        shim: &mut F,
        sidecar: Option<&mut F>,
        command_line: CommandLineType<'_>,
        initrd: Option<&[u8]>,
        memory_page_base: Option<u64>,
        memory_page_count: u64,
        vtl0_config: Vtl0Config<'_>,
    ) -> Result<(), Error>
       where F: Read + Seek;
}
Expand description

A trait to specialize behavior of the file builder based on different register types for different architectures. Different methods may need to be called depending on the register type that represents the given architecture.

Required Methods§

Source

fn load_uefi( importer: &mut dyn ImageLoad<Self>, image: &[u8], config: ConfigType, ) -> Result<LoadInfo, Error>

Source

fn load_linux_kernel_and_initrd<F>( importer: &mut impl ImageLoad<Self>, kernel_image: &mut F, kernel_minimum_start_address: u64, initrd: Option<InitrdConfig<'_>>, device_tree_blob: Option<&[u8]>, ) -> Result<LoadInfo, Error>
where F: Read + Seek, Self: GuestArch,

Source

fn load_openhcl<F>( importer: &mut dyn ImageLoad<Self>, kernel_image: &mut F, shim: &mut F, sidecar: Option<&mut F>, command_line: CommandLineType<'_>, initrd: Option<&[u8]>, memory_page_base: Option<u64>, memory_page_count: u64, vtl0_config: Vtl0Config<'_>, ) -> Result<(), Error>
where F: Read + Seek,

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.

Implementations on Foreign Types§

Source§

impl IgvmfilegenRegister for Aarch64Register

Source§

fn load_uefi( importer: &mut dyn ImageLoad<Self>, image: &[u8], config: ConfigType, ) -> Result<LoadInfo, Error>

Source§

fn load_linux_kernel_and_initrd<F>( importer: &mut impl ImageLoad<Self>, kernel_image: &mut F, kernel_minimum_start_address: u64, initrd: Option<InitrdConfig<'_>>, device_tree_blob: Option<&[u8]>, ) -> Result<LoadInfo, Error>
where F: Read + Seek,

Source§

fn load_openhcl<F>( importer: &mut dyn ImageLoad<Self>, kernel_image: &mut F, shim: &mut F, _sidecar: Option<&mut F>, command_line: CommandLineType<'_>, initrd: Option<&[u8]>, memory_page_base: Option<u64>, memory_page_count: u64, vtl0_config: Vtl0Config<'_>, ) -> Result<(), Error>
where F: Read + Seek,

Source§

impl IgvmfilegenRegister for X86Register

Source§

fn load_uefi( importer: &mut dyn ImageLoad<Self>, image: &[u8], config: ConfigType, ) -> Result<LoadInfo, Error>

Source§

fn load_linux_kernel_and_initrd<F>( importer: &mut impl ImageLoad<Self>, kernel_image: &mut F, kernel_minimum_start_address: u64, initrd: Option<InitrdConfig<'_>>, _device_tree_blob: Option<&[u8]>, ) -> Result<LoadInfo, Error>
where F: Read + Seek,

Source§

fn load_openhcl<F>( importer: &mut dyn ImageLoad<Self>, kernel_image: &mut F, shim: &mut F, sidecar: Option<&mut F>, command_line: CommandLineType<'_>, initrd: Option<&[u8]>, memory_page_base: Option<u64>, memory_page_count: u64, vtl0_config: Vtl0Config<'_>, ) -> Result<(), Error>
where F: Read + Seek,

Implementors§