aboutsummaryrefslogtreecommitdiff
path: root/softmmu
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@redhat.com>2021-12-15 23:02:21 +0100
committerPhilippe Mathieu-Daudé <philmd@redhat.com>2021-12-31 01:05:27 +0100
commit392e48af3468d7f8e49db33fdc9e28b5f99276ce (patch)
tree274618168e58c5ec08008eb8bd1ef3a011946c63 /softmmu
parent959384e74e1b508acc3af6e806b3d7b87335fc2a (diff)
downloadqemu-392e48af3468d7f8e49db33fdc9e28b5f99276ce.zip
qemu-392e48af3468d7f8e49db33fdc9e28b5f99276ce.tar.gz
qemu-392e48af3468d7f8e49db33fdc9e28b5f99276ce.tar.bz2
dma: Let dma_buf_write() take MemTxAttrs argument
Let devices specify transaction attributes when calling dma_buf_write(). Keep the default MEMTXATTRS_UNSPECIFIED in the few callers. Reviewed-by: Klaus Jensen <k.jensen@samsung.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20211223115554.3155328-12-philmd@redhat.com>
Diffstat (limited to 'softmmu')
-rw-r--r--softmmu/dma-helpers.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/softmmu/dma-helpers.c b/softmmu/dma-helpers.c
index fa81d2b..2f1a241 100644
--- a/softmmu/dma-helpers.c
+++ b/softmmu/dma-helpers.c
@@ -322,10 +322,9 @@ uint64_t dma_buf_read(void *ptr, int32_t len, QEMUSGList *sg)
MEMTXATTRS_UNSPECIFIED);
}
-uint64_t dma_buf_write(void *ptr, int32_t len, QEMUSGList *sg)
+uint64_t dma_buf_write(void *ptr, int32_t len, QEMUSGList *sg, MemTxAttrs attrs)
{
- return dma_buf_rw(ptr, len, sg, DMA_DIRECTION_TO_DEVICE,
- MEMTXATTRS_UNSPECIFIED);
+ return dma_buf_rw(ptr, len, sg, DMA_DIRECTION_TO_DEVICE, attrs);
}
void dma_acct_start(BlockBackend *blk, BlockAcctCookie *cookie,