diff mbox

Revert "Sync idcache after emualted DMA operations for ia64"

Message ID 1241209080-14451-1-git-send-email-hollisb@us.ibm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Hollis Blanchard May 1, 2009, 8:18 p.m. UTC
This reverts commit 9dc99a28236161a5a1b4c58f1e9c4ec6179cb976.
Aside from the other issues discussed on kvm-devel, this commit breaks the
PowerPC build.

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>

---
Bad mailing list address on my previous mail.

 cache-utils.h |   14 --------------
 cutils.c      |    3 ---
 dma-helpers.c |   12 ------------
 exec.c        |    3 ---
 4 files changed, 0 insertions(+), 32 deletions(-)

Comments

Avi Kivity May 3, 2009, 4:12 p.m. UTC | #1
Hollis Blanchard wrote:
> This reverts commit 9dc99a28236161a5a1b4c58f1e9c4ec6179cb976.
> Aside from the other issues discussed on kvm-devel, this commit breaks the
> PowerPC build.
>
>   

Applied, thanks.
Zhang, Xiantao May 4, 2009, 1:39 a.m. UTC | #2
Avi Kivity wrote:
> Hollis Blanchard wrote:
>> This reverts commit 9dc99a28236161a5a1b4c58f1e9c4ec6179cb976.
>> Aside from the other issues discussed on kvm-devel, this commit
>> breaks the PowerPC build. 
>> 
>> 
> 
> Applied, thanks.

Hollis, 
   Could you explain why this patch breaks the powerpc build?  qemu_sync_icache has the definition for non-ai64 case, so shoudn't break any arch-specific build.  
Xiantao--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Hollis Blanchard May 4, 2009, 4:52 p.m. UTC | #3
On Mon, 2009-05-04 at 09:39 +0800, Zhang, Xiantao wrote:
>    Could you explain why this patch breaks the powerpc build?
> qemu_sync_icache has the definition for non-ai64 case, so shoudn't
> break any arch-specific build.  

cutils.o: In function `qemu_iovec_from_buffer':
/home/hollisb/source/qemu-kvm.git/cutils.c:175: undefined reference to
`qemu_cache_conf'
/home/hollisb/source/qemu-kvm.git/cutils.c:171: undefined reference to
`qemu_cache_conf'
cutils.o: In function `qemu_iovec_from_buffer':
/home/hollisb/source/qemu-kvm.git/cache-utils.h:18: undefined reference
to `qemu_cache_conf'

However, to restate my point: the build error is not the biggest problem
with this patch. The bigger problems are all the other issues I've
repeatedly described. The build break is the icing on the cake.
diff mbox

Patch

diff --git a/cache-utils.h b/cache-utils.h
index 2a07fbd..b45fde4 100644
--- a/cache-utils.h
+++ b/cache-utils.h
@@ -33,22 +33,8 @@  static inline void flush_icache_range(unsigned long start, unsigned long stop)
     asm volatile ("sync" : : : "memory");
     asm volatile ("isync" : : : "memory");
 }
-#define qemu_sync_idcache flush_icache_range
-#else
 
-#ifdef __ia64__
-static inline void qemu_sync_idcache(unsigned long start, unsigned long stop)
-{
-    while (start < stop) {
-	    asm volatile ("fc %0" :: "r"(start));
-	    start += 32;
-    }
-    asm volatile (";;sync.i;;srlz.i;;");
-}
 #else
-static inline void qemu_sync_idcache(unsigned long start, unsigned long stop) {}
-#endif
-
 #define qemu_cache_utils_init(envp) do { (void) (envp); } while (0)
 #endif
 
diff --git a/cutils.c b/cutils.c
index 4bf4fcd..5b36cc6 100644
--- a/cutils.c
+++ b/cutils.c
@@ -23,7 +23,6 @@ 
  */
 #include "qemu-common.h"
 #include "host-utils.h"
-#include "cache-utils.h"
 #include <assert.h>
 
 void pstrcpy(char *buf, int buf_size, const char *str)
@@ -216,8 +215,6 @@  void qemu_iovec_from_buffer(QEMUIOVector *qiov, const void *buf, size_t count)
         if (copy > qiov->iov[i].iov_len)
             copy = qiov->iov[i].iov_len;
         memcpy(qiov->iov[i].iov_base, p, copy);
-        qemu_sync_idcache((unsigned long)qiov->iov[i].iov_base,
-                  (unsigned long)(qiov->iov[i].iov_base + copy));
         p     += copy;
         count -= copy;
     }
diff --git a/dma-helpers.c b/dma-helpers.c
index f71ca3b..f9eb224 100644
--- a/dma-helpers.c
+++ b/dma-helpers.c
@@ -9,7 +9,6 @@ 
 
 #include "dma.h"
 #include "block_int.h"
-#include "cache-utils.h"
 
 static AIOPool dma_aio_pool;
 
@@ -138,8 +137,6 @@  static BlockDriverAIOCB *dma_bdrv_io(
     BlockDriverCompletionFunc *cb, void *opaque,
     int is_write)
 {
-    int i;
-    QEMUIOVector *qiov;
     DMAAIOCB *dbs =  qemu_aio_get_pool(&dma_aio_pool, bs, cb, opaque);
 
     dbs->acb = NULL;
@@ -152,15 +149,6 @@  static BlockDriverAIOCB *dma_bdrv_io(
     dbs->bh = NULL;
     qemu_iovec_init(&dbs->iov, sg->nsg);
     dma_bdrv_cb(dbs, 0);
-
-    if (!is_write) {
-        qiov = &dbs->iov;
-        for (i = 0; i < qiov->niov; ++i) {
-           qemu_sync_idcache((unsigned long)qiov->iov[i].iov_base,
-                 (unsigned long)(qiov->iov[i].iov_base + qiov->iov[i].iov_len));
-	}
-    }
-
     if (!dbs->acb) {
         qemu_aio_release(dbs);
         return NULL;
diff --git a/exec.c b/exec.c
index 16d3cf8..262c72f 100644
--- a/exec.c
+++ b/exec.c
@@ -3400,9 +3400,6 @@  void cpu_physical_memory_unmap(void *buffer, target_phys_addr_t len,
                 addr1 += l;
                 access_len -= l;
             }
-            if (kvm_enabled())
-	        flush_icache_range((unsigned long)buffer,
-				(unsigned long)buffer + access_len);
         }
         return;
     }