History | View | Annotate | Download (10.9 kB)
softmmu: move include files to include/sysemu/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
misc: move include files to include/qemu/
aio: rename AIOPool to AIOCBInfo
Now that AIOPool no longer keeps a freelist, it isn't really a "pool" anymore. Rename it to AIOCBInfo and make it const since it no longerneeds to be modified.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Rename target_phys_addr_t to hwaddr
target_phys_addr_t is unwieldly, violates the C standard (_t suffixes arereserved) and its purpose doesn't match the name (most target_phys_addr_taddresses are not target specific). Replace it with a finger-friendly,...
dma: make dma access its own address space
Instead of accessing the cpu address space, use an address spaceconfigured by the caller.
Eventually all dma functionality will be folded into AddressSpace,but we have to start from something.
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>...
dma: Fix stupid typo/thinko
Hi hard a brain fart when coding that function, it willfail to "set" the memory beyond the first 512 bytes. Thisis in turn causing guest crashes in ibmveth (spapr_llan.con the qemu side) due to the receive queue not beingproperly initialized....
ahci: Fix sglist memleak in ahci_dma_rw_buf()
I noticed that in hw/ide/ahci:ahci_dma_rw_buf() we do not free the sglist. Thus,I've added a call to qemu_sglist_destroy() to fix this memory leak.
In addition, I've adeed a call in qemu_sglist_destroy() to 0 all of the sglist...
Add a memory barrier to DMA functions
The emulated devices can run simultaneously with the guest, sowe need to be careful with ordering of load and stores done bythem to the guest system memory, which need to be observed inthe right order by the guest operating system....
iommu: Add universal DMA helper functions
Not that long ago, every device implementation using DMA directlyaccessed guest memory using cpu_physical_memory_*(). This meant thatadding support for a guest visible IOMMU would require changing everyone of these devices to go through IOMMU translation....
iommu: Make sglists and dma_bdrv helpers use new universal DMA helpers
dma-helpers.c contains a number of helper functions for doingscatter/gather DMA, and various block device related DMA. Currently,these directly access guest memory using cpu_physical_memory_*(),...
iommu: Introduce IOMMU emulation infrastructure
This patch adds the basic infrastructure necessary to emulate an IOMMUvisible to the guest. The DMAContext structure is extended withinformation and a callback describing the translation, and the various...
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.
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>...