diff options
author | Philippe Mathieu-Daudé <philmd@redhat.com> | 2021-12-15 23:29:52 +0100 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@redhat.com> | 2021-12-31 01:05:27 +0100 |
commit | 1e5a3f8b2a976054da96cbbb9de6cbac7c2efb79 (patch) | |
tree | 85cdf06fcf5c3edd204010f5a19d7634eda56320 /softmmu | |
parent | 392e48af3468d7f8e49db33fdc9e28b5f99276ce (diff) |
dma: Let dma_buf_read() take MemTxAttrs argument
Let devices specify transaction attributes when calling
dma_buf_read().
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-13-philmd@redhat.com>
Diffstat (limited to 'softmmu')
-rw-r--r-- | softmmu/dma-helpers.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/softmmu/dma-helpers.c b/softmmu/dma-helpers.c index 2f1a241b81..a391773c29 100644 --- a/softmmu/dma-helpers.c +++ b/softmmu/dma-helpers.c @@ -316,10 +316,9 @@ static uint64_t dma_buf_rw(void *buf, int32_t len, QEMUSGList *sg, return resid; } -uint64_t dma_buf_read(void *ptr, int32_t len, QEMUSGList *sg) +uint64_t dma_buf_read(void *ptr, int32_t len, QEMUSGList *sg, MemTxAttrs attrs) { - return dma_buf_rw(ptr, len, sg, DMA_DIRECTION_FROM_DEVICE, - MEMTXATTRS_UNSPECIFIED); + return dma_buf_rw(ptr, len, sg, DMA_DIRECTION_FROM_DEVICE, attrs); } uint64_t dma_buf_write(void *ptr, int32_t len, QEMUSGList *sg, MemTxAttrs attrs) |