fn write_dma_memory(
    addr_space: &Arc<AddressSpace>,
    addr: GuestAddress,
    mut buf: &[u8],
    len: u64,
) -> Result<()> {
    addr_space.write(&mut buf, addr, len).chain_err(|| {
        format!(
            "Failed to write dma memory of fwcfg at gpa=0x{:x} len=0x{:x}",
            addr.0, len
        )
    })?;

    Ok(())
}
/// write data to DMA memory zone
write data to DMA memory zone
write data to DMA memory zone
fn write_dma_memory(
    addr_space: &Arc<AddressSpace>,
    addr: GuestAddress,
    mut buf: &[u8],
    len: u64,
) -> Result<()> {
    addr_space.write(&mut buf, addr, len).chain_err(|| {
        format!(
            "Failed to write dma memory of fwcfg at gpa=0x{:x} len=0x{:x}",
            addr.0, len
        )
    })?;
    Ok(())
}
fn write_dma_memory ( addr_space : & Arc < AddressSpace > , addr : GuestAddress , mut buf : & [ u8 ] , len : u64 , ) -> Result < ( ) > { addr_space . write ( & mut buf , addr , len ) . chain_err ( | | { format ! ( " " addr 0 len ) } ) ? ; Ok ( ( ) ) }
write data to DMA memory zone
write data to DMA memory zone
addr_space
&Arc<AddressSpace>
addr
GuestAddress
buf
&[u8]
len
u64
addr_space
&Arc<AddressSpace>
addr
GuestAddress
buf
&[u8]
len
u64