summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJes Sorensen <jes@sgi.com>2009-05-25 15:12:49 +0200
committerAvi Kivity <avi@redhat.com>2009-06-07 09:28:11 +0300
commitaaf630a4dd27f8d6e7b4b4c3e44d537a310624f6 (patch)
tree33277ed9dbb9c135ba3e9ec0089275b7a781b26d /dma-helpers.c
parentMake qemu-kvm build and run again on ia64 (diff)
downloadqemu-kvm-aaf630a4dd27f8d6e7b4b4c3e44d537a310624f6.tar.gz
qemu-kvm-aaf630a4dd27f8d6e7b4b4c3e44d537a310624f6.tar.bz2
qemu-kvm-aaf630a4dd27f8d6e7b4b4c3e44d537a310624f6.zip
Flush icache after dma operations for ia64
ia64 system depends on that platform issues snoop cycle to flush icache for memory touched by DMA write operations, but virtual DMA operations is emulated by memcpy, so use explict instrustions to flush the related icache, otherwise, guest may use obsolete icache. Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Jes Sorensen <jes@sgi.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'dma-helpers.c')
-rw-r--r--dma-helpers.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/dma-helpers.c b/dma-helpers.c
index 712ed897f..d4fc077c0 100644
--- a/dma-helpers.c
+++ b/dma-helpers.c
@@ -160,6 +160,10 @@ static BlockDriverAIOCB *dma_bdrv_io(
dbs->is_write = is_write;
dbs->bh = NULL;
qemu_iovec_init(&dbs->iov, sg->nsg);
+ /*
+ * DMA flushing is handled in dma_bdrv_cb() calling dma_bdrv_unmap()
+ * so we don't need to do that here.
+ */
dma_bdrv_cb(dbs, 0);
if (!dbs->acb) {
qemu_aio_release(dbs);