qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-ppc] [PATCH 1/2] dma-helpers.c: [HACK] disable iovec truncation to


From: Mark Cave-Ayland
Subject: [Qemu-ppc] [PATCH 1/2] dma-helpers.c: [HACK] disable iovec truncation to nearest sector size
Date: Fri, 27 May 2016 09:48:41 +0100

This is not a production fix but is included to allow the following patch to
work until a proper solution is found. Otherwise iovecs which are not an
exact multiple of 0x200 are artificially truncated causing corruption to the
unaligned accesses required by Darwin PPC on the macio controller.

Signed-off-by: Mark Cave-Ayland <address@hidden>
---
 dma-helpers.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/dma-helpers.c b/dma-helpers.c
index b521d84..693394a 100644
--- a/dma-helpers.c
+++ b/dma-helpers.c
@@ -160,9 +160,11 @@ static void dma_blk_cb(void *opaque, int ret)
         return;
     }
 
+    /* FIXME: this breaks unaligned DMA accesses 
     if (dbs->iov.size & ~BDRV_SECTOR_MASK) {
         qemu_iovec_discard_back(&dbs->iov, dbs->iov.size & ~BDRV_SECTOR_MASK);
     }
+    */
 
     dbs->acb = dbs->io_func(dbs->offset, &dbs->iov,
                             dma_blk_cb, dbs, dbs->io_func_opaque);
-- 
1.7.10.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]