Statistics
| Branch: | Revision:

root / dma-helpers.c @ 753d11f2

History | View | Annotate | Download (5.1 kB)

# Date Author Comment
c3adb5b9 09/20/2011 01:27 pm Paolo Bonzini

dma-helpers: rewrite completion/cancellation

This fixes various problems with completion/cancellation:

  • if the io_func fails to get an AIOCB, the callback wasn't called
  • If DMA encounters a bounce buffer conflict, and the DMA operation is
    canceled before the bottom half fires, bad things happen....
bbca72c6 09/19/2011 12:35 pm Paolo Bonzini

dma-helpers: rename is_write to to_dev

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Kevin Wolf <>

7267c094 08/21/2011 07:01 am Anthony Liguori

Use glib memory allocation and free functions

qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <>

cb144ccb 06/15/2011 03:36 pm Christoph Hellwig

make dma_bdrv_io available to drivers

Make dma_bdrv_io available for drivers, and pass an explicit I/O function
instead of hardcoding bdrv_aio_readv/bdrv_aio_writev. This is required
to implement non-READ/WRITE dma commands in the ide driver, e.g. the
upcoming TRIM support....

c227f099 10/02/2009 12:12 am Anthony Liguori

Revert "Get rid of _t suffix"

In the very least, a change like this requires discussion on the list.

The naming convention is goofy and it causes a massive merge problem. Something
like this must be presented on the list first so people can provide input...

99a0949b 10/01/2009 09:45 pm malc

Get rid of _t suffix

Some not so obvious bits, slirp and Xen were left alone for the time
being.

Signed-off-by: malc <>

c16b5a2c 05/27/2009 05:46 pm Christoph Hellwig

fully split aio_pool from BlockDriver

Now that we have a separate aio pool structure we can remove those
aio pool details from BlockDriver.

Every driver supporting AIO now needs to declare a static AIOPool
with the aiocb size and the cancellation method. This cleans up the...

856ae5c3 04/07/2009 08:57 pm blueswir1

Fix a few Sparse warnings

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7016 c046a42c-6fe2-441c-8c8c-71466251a162

7403b14e 03/28/2009 06:11 pm aliguori

Fix DMA API when handling an immediate error from block layer (Avi Kivity)

The block layer may signal an immediate error on an asynchronous request
by returning NULL. The DMA API did not handle this correctly, returning
an AIO request which would never complete (and which would crash if...

37b7842c 03/20/2009 08:26 pm aliguori

Move block dma helpers aiocb to store dma state (Avi Kivity)

Use the dedicated dma aiocb to store intermediate state for dma block
transactions.

Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6874 c046a42c-6fe2-441c-8c8c-71466251a162

6512a2a7 03/20/2009 08:26 pm aliguori

Implement cancellation method for dma async I/O (Avi Kivity)

Move the dma helpers to a private aio pool, and implement a cancellation
method for them. Should prevent issues when cancelling I/O while dma is
in progress.

Signed-off-by: Avi Kivity <>...

59a703eb 02/05/2009 11:23 pm aliguori

Introduce block dma helpers (Avi Kivity)

These helpers perform read/write requests on entire scatter/gather lists,
relieving the device emulation code from mapping and unmapping physical
memory, and from looping when map resources are exhausted.

Signed-off-by: Avi Kivity <>...

244ab90e 02/05/2009 11:23 pm aliguori

Add a scatter-gather list type and accessors (Avi Kivity)

Scatter-gather lists are used extensively in dma-capable devices; a
single data structure allows more code reuse later on.

Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>...