History | View | Annotate | Download (2 kB)
Merge remote-tracking branch 'kwolf/for-anthony' into staging
remove useless comments in dma
This comment is useless, just removes it and makes the codes clear.
Signed-off-by: Wanpeng Li <liwp@linux.vnet.ibm.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
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...
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-helpers: make QEMUSGList target independent
scsi-disk will manage scatter/gather list, but it does not createsingle entries so it remains target-independent. Make QEMUSGListavailable to it.
Define DMA address and direction types
As a preliminary to adding more extensive DMA and IOMMU infrastructuresupport into qemu, this patch defines a dma_addr_t for storing DMA busaddresses and a DMADirection enum which describes whether a DMA isfrom an external device to main memory or from main memory to an...
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: allow including from target-independent code
Target-independent code cannot construct sglists, but it can takethem from the outside as a black box. Allow this.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
dma-helpers: rename is_write to to_dev
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 <kraxel@redhat.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...
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 ofbuilding for every target.
Remove and poison various target specific macros to avoid bogus target...
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>...