fn write_bootparams<M>(params: BootParams, guest_memory: &M) -> Result<()>
    where
        M: GuestMemory,
    {
        // The VMM has filled a `boot_params` struct and its e820 map.
        // This will be written in guest memory at the zero page.
        guest_memory
            .checked_offset(params.header_start, params.header.len())
            .ok_or(Error::ZeroPagePastRamEnd)?;
        guest_memory
            .write_slice(params.header.as_slice(), params.header_start)
            .map_err(|_| Error::ZeroPageSetup)?;

        Ok(())
    }
/// Writes the boot parameters (configured elsewhere) into guest memory.
///
/// # Arguments
///
/// * `params` - boot parameters. The header contains a [`boot_params`] struct. The `sections`
///              and `modules` are unused.
/// * `guest_memory` - guest's physical memory.
///
/// [`boot_params`]: ../loader/bootparam/struct.boot_params.html
Writes the boot parameters (configured elsewhere) into guest memory.
Writes the boot parameters ( configured elsewhere ) into guest memory .
fn write_bootparams<M>(params: BootParams, guest_memory: &M) -> Result<()>
    where
        M: GuestMemory,
    {
        // The VMM has filled a `boot_params` struct and its e820 map.
        // This will be written in guest memory at the zero page.
        guest_memory
            .checked_offset(params.header_start, params.header.len())
            .ok_or(Error::ZeroPagePastRamEnd)?;
        guest_memory
            .write_slice(params.header.as_slice(), params.header_start)
            .map_err(|_| Error::ZeroPageSetup)?;
        Ok(())
    }
fn write_bootparams < M > ( params : BootParams , guest_memory : & M ) -> Result < ( ) > where M : GuestMemory , { // The VMM has filled a `boot_params` struct and its e820 map. // This will be written in guest memory at the zero page. guest_memory . checked_offset ( params . header_start , params . header . len ( ) ) . ok_or ( Error :: ZeroPagePastRamEnd ) ? ; guest_memory . write_slice ( params . header . as_slice ( ) , params . header_start ) . map_err ( | _ | Error :: ZeroPageSetup ) ? ; Ok ( ( ) ) }
Writes the boot parameters (configured elsewhere) into guest memory.
Writes the boot parameters ( configured elsewhere ) into guest memory .
params
BootParams
guest_memory
&M
params
BootParams
guest_memory
&M