diff options
Diffstat (limited to 'dma-helpers.c')
-rw-r--r-- | dma-helpers.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/dma-helpers.c b/dma-helpers.c index 53cbe925d1..499b52bc5a 100644 --- a/dma-helpers.c +++ b/dma-helpers.c @@ -170,6 +170,10 @@ static void dma_bdrv_cb(void *opaque, int ret) return; } + 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->bs, dbs->sector_num, &dbs->iov, dbs->iov.size / 512, dma_bdrv_cb, dbs); assert(dbs->acb); |