aboutsummaryrefslogtreecommitdiff
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 /cutils.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 'cutils.c')
-rw-r--r--cutils.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cutils.c b/cutils.c
index 0623cf70d..6ea0c4962 100644
--- a/cutils.c
+++ b/cutils.c
@@ -164,6 +164,11 @@ void qemu_iovec_to_buffer(QEMUIOVector *qiov, void *buf)
}
}
+/*
+ * No dma flushing needed here, as the aio code will call dma_bdrv_cb()
+ * on completion as well, which will result in a call to
+ * dma_bdrv_unmap() which will do the flushing ....
+ */
void qemu_iovec_from_buffer(QEMUIOVector *qiov, const void *buf, size_t count)
{
const uint8_t *p = (const uint8_t *)buf;