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 <mark.cave-ayl...@ilande.co.uk>
---
 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