History | View | Annotate | Download (6.3 kB)
Use DMADirection type for dma_bdrv_io
Currently dma_bdrv_io() takes a 'to_dev' boolean parameter todetermine the direction of DMA it is emulating. We already have aDMADirection enum designed specifically to encode DMA directions.This patch uses it for dma_bdrv_io() as well. This involves removing...
aio: move BlockDriverAIOCB to qemu-aio.h
And remove several block_int.h inclusions that should not be there.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
dma-helpers: add dma_buf_read and dma_buf_write
These helpers do a full transfer from an in-memory buffer to targetmemory, with support for scatter/gather lists. It will be used tostore the reply of an emulated command into a QEMUSGList provided bythe adapter....
dma-helpers: add accounting wrappers
The length of the transfer is already in the sglist, the wrapper simplyfetches it.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
dma: the passed io_func does not return NULL
Initially found with the following semantic patch:
type BlockDriverAIOCB *x;expression E;@@ x = E;- if (x == NULL) { ... }
type
acb1 expression E, E1;@@ E1->acb = E;- if (E1->acb == NULL) { ... }...
acb1
dma-helpers: Add trace events
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Use dma_addr_t type for scatter/gather code
This patch uses the newly created dma_addr_t type throughout thescatter/gather handling code in dma-helpers.c whenever we need torepresent a dma bus address. This makes a better distinction as towhat is a bus address and what is a cpu physical address. Since we...
dma-helpers: rewrite completion/cancellation
This fixes various problems with completion/cancellation:
dma-helpers: rename is_write to to_dev
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
make dma_bdrv_io available to drivers
Make dma_bdrv_io available for drivers, and pass an explicit I/O functioninstead of hardcoding bdrv_aio_readv/bdrv_aio_writev. This is requiredto implement non-READ/WRITE dma commands in the ide driver, e.g. theupcoming TRIM support....
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. Somethinglike this must be presented on the list first so people can provide input...
Get rid of _t suffix
Some not so obvious bits, slirp and Xen were left alone for the timebeing.
Signed-off-by: malc <av1474@comtv.ru>
fully split aio_pool from BlockDriver
Now that we have a separate aio pool structure we can remove thoseaio pool details from BlockDriver.
Every driver supporting AIO now needs to declare a static AIOPoolwith the aiocb size and the cancellation method. This cleans up the...
Fix a few Sparse warnings
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7016 c046a42c-6fe2-441c-8c8c-71466251a162
Fix DMA API when handling an immediate error from block layer (Avi Kivity)
The block layer may signal an immediate error on an asynchronous requestby returning NULL. The DMA API did not handle this correctly, returningan AIO request which would never complete (and which would crash if...
Move block dma helpers aiocb to store dma state (Avi Kivity)
Use the dedicated dma aiocb to store intermediate state for dma blocktransactions.
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6874 c046a42c-6fe2-441c-8c8c-71466251a162
Implement cancellation method for dma async I/O (Avi Kivity)
Move the dma helpers to a private aio pool, and implement a cancellationmethod for them. Should prevent issues when cancelling I/O while dma isin progress.
Signed-off-by: Avi Kivity <avi@redhat.com>...
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 physicalmemory, and from looping when map resources are exhausted.
Add a scatter-gather list type and accessors (Avi Kivity)
Scatter-gather lists are used extensively in dma-capable devices; asingle data structure allows more code reuse later on.
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...