From 49d68a14f1eb317ce27c370a653ab909b4d259a7 Mon Sep 17 00:00:00 2001
From: Zhang Xiantao <xiantao.zhang@intel.com>
Date: Sat, 8 Dec 2007 10:42:49 +0800
Subject: [PATCH] kvm: qemu: Sync ID cache after DMA memory access.

Since IA64 has splitted icache and dcache, hardware's dma
operations ensures the synchronization, in virtualziation world
we also need to guarantee it through software.
Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com>
---
 qemu/exec.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/qemu/exec.c b/qemu/exec.c
index 01a366b..cf14fdd 100644
--- a/qemu/exec.c
+++ b/qemu/exec.c
@@ -2600,6 +2600,9 @@ void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf,
                     phys_ram_dirty[addr1 >> TARGET_PAGE_BITS] |=
                         (0xff & ~CODE_DIRTY_FLAG);
                 }
+#ifdef __ia64__
+		kvm_sync_icache((unsigned long)ptr, l);
+#endif
             }
         } else {
             if ((pd & ~TARGET_PAGE_MASK) > IO_MEM_ROM &&
-- 
1.5.2

