From: chris@kneesaa.uk.xensource.com Date: Tue, 15 Aug 2006 12:53:18 +0000 (+0100) Subject: [qemu/ia64] Sync ID cache only guest do DMA read. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15710^2~104^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ec5d192958e069820962583a1749092a67c1fec3;p=xen.git [qemu/ia64] Sync ID cache only guest do DMA read. Fix ID cache sync time. Only when guest does DMA read, ID sync cache is needed for VTi. From: Zhang, Xiantao Signed-off-by: Christian Limpach --- diff --git a/tools/ioemu/target-i386-dm/exec-dm.c b/tools/ioemu/target-i386-dm/exec-dm.c index af97adf7d8..cd7af5583f 100644 --- a/tools/ioemu/target-i386-dm/exec-dm.c +++ b/tools/ioemu/target-i386-dm/exec-dm.c @@ -449,6 +449,9 @@ void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf, /* RAM case */ ptr = phys_ram_base + addr1; memcpy(ptr, buf, l); +#ifdef __ia64__ + sync_icache((unsigned long)ptr, l); +#endif } } else { if (io_index) { @@ -473,9 +476,6 @@ void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf, ptr = phys_ram_base + (pd & TARGET_PAGE_MASK) + (addr & ~TARGET_PAGE_MASK); memcpy(buf, ptr, l); -#ifdef __ia64__ - sync_icache((unsigned long)ptr, l); -#endif } else { /* unreported MMIO space */ memset(buf, 0xff, len);