diff mbox

[1/2] dma-helpers.c: [HACK] disable iovec truncation to nearest sector size

Message ID 1464338922-13102-2-git-send-email-mark.cave-ayland@ilande.co.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Mark Cave-Ayland May 27, 2016, 8:48 a.m. UTC
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-ayland@ilande.co.uk>
---
 dma-helpers.c |    2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

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);