fn write_dma_result(addr_space: &Arc<AddressSpace>, addr: GuestAddress, value: u32) -> Result<()> {
    let mut dma_buf: [u8; 4] = [0; 4];
    BigEndian::write_u32(&mut dma_buf, value);
    write_dma_memory(
        addr_space,
        addr.unchecked_add(offset_of!(FwCfgDmaAccess, control) as u64),
        &dma_buf,
        dma_buf.len() as u64,
    )
    .chain_err(|| {
        format!(
            "Failed to write dma result of fwcfg at gpa=0x{:x} value=0x{:x}",
            addr.0, value
        )
    })?;
    Ok(())
}
/// Write DMA result to DMA response zone
Write DMA result to DMA response zone
Write DMA result to DMA response zone
fn write_dma_result(addr_space: &Arc<AddressSpace>, addr: GuestAddress, value: u32) -> Result<()> {
    let mut dma_buf: [u8; 4] = [0; 4];
    BigEndian::write_u32(&mut dma_buf, value);
    write_dma_memory(
        addr_space,
        addr.unchecked_add(offset_of!(FwCfgDmaAccess, control) as u64),
        &dma_buf,
        dma_buf.len() as u64,
    )
    .chain_err(|| {
        format!(
            "Failed to write dma result of fwcfg at gpa=0x{:x} value=0x{:x}",
            addr.0, value
        )
    })?;
    Ok(())
}
fn write_dma_result ( addr_space : & Arc < AddressSpace > , addr : GuestAddress , value : u32 ) -> Result < ( ) > { let mut dma_buf : [ u8 ; 4 ] = [ 0 ; 4 ] ; BigEndian :: write_u32 ( & mut dma_buf , value ) ; write_dma_memory ( addr_space , addr . unchecked_add ( offset_of ! ( FwCfgDmaAccess control ) as u64 ) , & dma_buf , dma_buf . len ( ) as u64 , ) . chain_err ( | | { format ! ( " " addr 0 value ) } ) ? ; Ok ( ( ) ) }
Write DMA result to DMA response zone
Write DMA result to DMA response zone
addr_space
&Arc<AddressSpace>
addr
GuestAddress
value
u32
addr_space
&Arc<AddressSpace>
addr
GuestAddress
value
u32