mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
dma: Let dma_memory_read/write() take MemTxAttrs argument
Let devices specify transaction attributes when calling dma_memory_read() or dma_memory_write(). Patch created mechanically using spatch with this script: @@ expression E1, E2, E3, E4; @@ ( - dma_memory_read(E1, E2, E3, E4) + dma_memory_read(E1, E2, E3, E4, MEMTXATTRS_UNSPECIFIED) | - dma_memory_write(E1, E2, E3, E4) + dma_memory_write(E1, E2, E3, E4, MEMTXATTRS_UNSPECIFIED) ) Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Li Qiang <liq3ea@gmail.com> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20211223115554.3155328-6-philmd@redhat.com>
This commit is contained in:
parent
23faf5694f
commit
ba06fe8add
30 changed files with 241 additions and 150 deletions
|
@ -272,8 +272,8 @@ static void dwc2_handle_packet(DWC2State *s, uint32_t devadr, USBDevice *dev,
|
|||
|
||||
if (pid != USB_TOKEN_IN) {
|
||||
trace_usb_dwc2_memory_read(hcdma, tlen);
|
||||
if (dma_memory_read(&s->dma_as, hcdma,
|
||||
s->usb_buf[chan], tlen) != MEMTX_OK) {
|
||||
if (dma_memory_read(&s->dma_as, hcdma, s->usb_buf[chan], tlen,
|
||||
MEMTXATTRS_UNSPECIFIED) != MEMTX_OK) {
|
||||
qemu_log_mask(LOG_GUEST_ERROR, "%s: dma_memory_read failed\n",
|
||||
__func__);
|
||||
}
|
||||
|
@ -328,8 +328,8 @@ babble:
|
|||
|
||||
if (pid == USB_TOKEN_IN) {
|
||||
trace_usb_dwc2_memory_write(hcdma, actual);
|
||||
if (dma_memory_write(&s->dma_as, hcdma, s->usb_buf[chan],
|
||||
actual) != MEMTX_OK) {
|
||||
if (dma_memory_write(&s->dma_as, hcdma, s->usb_buf[chan], actual,
|
||||
MEMTXATTRS_UNSPECIFIED) != MEMTX_OK) {
|
||||
qemu_log_mask(LOG_GUEST_ERROR, "%s: dma_memory_write failed\n",
|
||||
__func__);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue