qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 19/19] qtest/ahci: Adding simple dma read-write


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 19/19] qtest/ahci: Adding simple dma read-write test
Date: Mon, 02 Feb 2015 11:38:38 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0


On 30/01/2015 19:42, John Snow wrote:
> +    memwrite(ptr, tx, bufsize);
> +
> +    /* Write this buffer to disk, then read it back to the DMA buffer. */
> +    ahci_guest_io(ahci, px, CMD_WRITE_DMA, ptr, bufsize);

I would qmemset the buffer here.

Paolo

> +    ahci_guest_io(ahci, px, CMD_READ_DMA, ptr, bufsize);
> +
> +    /*** Read back the Data ***/
> +    memread(ptr, rx, bufsize);
> +    g_assert_cmphex(memcmp(tx, rx, bufsize), ==, 0);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]