Statistics
| Branch: | Revision:

root / dma.h @ c0424934

History | View | Annotate | Download (2 kB)

# Date Author Comment
bb5d8dd7 04/10/2012 04:16 pm Anthony Liguori

Merge remote-tracking branch 'kwolf/for-anthony' into staging

  • kwolf/for-anthony: (46 commits)
    qed: remove incoming live migration blocker
    qed: honor BDRV_O_INCOMING for incoming live migration
    migration: clear BDRV_O_INCOMING flags on end of incoming live migration...
97a33880 04/07/2012 04:46 pm Wanpeng Li

remove useless comments in dma

This comment is useless, just removes it and makes the codes clear.

Signed-off-by: Wanpeng Li <>
Signed-off-by: Blue Swirl <>

43cf8ae6 04/05/2012 03:54 pm David Gibson

Use DMADirection type for dma_bdrv_io

Currently dma_bdrv_io() takes a 'to_dev' boolean parameter to
determine the direction of DMA it is emulating. We already have a
DMADirection enum designed specifically to encode DMA directions.
This patch uses it for dma_bdrv_io() as well. This involves removing...

8171ee35 02/22/2012 02:29 pm Paolo Bonzini

dma-helpers: add dma_buf_read and dma_buf_write

These helpers do a full transfer from an in-memory buffer to target
memory, with support for scatter/gather lists. It will be used to
store the reply of an emulated command into a QEMUSGList provided by
the adapter....

84a69356 02/22/2012 02:29 pm Paolo Bonzini

dma-helpers: add accounting wrappers

The length of the transfer is already in the sglist, the wrapper simply
fetches it.

Signed-off-by: Paolo Bonzini <>

fead0c24 02/22/2012 02:29 pm Paolo Bonzini

dma-helpers: make QEMUSGList target independent

scsi-disk will manage scatter/gather list, but it does not create
single entries so it remains target-independent. Make QEMUSGList
available to it.

Signed-off-by: Paolo Bonzini <>

d9d1055e 11/01/2011 11:52 pm David Gibson

Define DMA address and direction types

As a preliminary to adding more extensive DMA and IOMMU infrastructure
support into qemu, this patch defines a dma_addr_t for storing DMA bus
addresses and a DMADirection enum which describes whether a DMA is
from an external device to main memory or from main memory to an...

d3231181 11/01/2011 11:52 pm David Gibson

Use dma_addr_t type for scatter/gather code

This patch uses the newly created dma_addr_t type throughout the
scatter/gather handling code in dma-helpers.c whenever we need to
represent a dma bus address. This makes a better distinction as to
what is a bus address and what is a cpu physical address. Since we...

10dc8aef 09/20/2011 01:27 pm Paolo Bonzini

dma-helpers: allow including from target-independent code

Target-independent code cannot construct sglists, but it can take
them from the outside as a black box. Allow this.

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

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 <>

d35bf9ad 08/04/2011 04:51 pm Gerd Hoffmann

move QEMUSGList typedef

Move the QEMUSGList typedef to qemu-common so it can easily be used.
The actual struct definition stays in dma.h.

Signed-off-by: Gerd Hoffmann <>

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...

1ad2134f 05/19/2009 06:17 pm Paul Brook

Hardware convenience library

The only target dependency for most hardware is sizeof(target_phys_addr_t).
Build these files into a convenience library, and use that instead of
building for every target.

Remove and poison various target specific macros to avoid bogus target...

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 <>...