[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 5/7] ehci: switch to guarded DMA accesses
From: |
Alexander Bulekov |
Subject: |
[PATCH v3 5/7] ehci: switch to guarded DMA accesses |
Date: |
Fri, 28 Oct 2022 15:16:46 -0400 |
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
---
hw/usb/hcd-ehci.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
index d4da8dcb8d..b93f4d44c1 100644
--- a/hw/usb/hcd-ehci.c
+++ b/hw/usb/hcd-ehci.c
@@ -383,8 +383,8 @@ static inline int get_dwords(EHCIState *ehci, uint32_t addr,
}
for (i = 0; i < num; i++, buf++, addr += sizeof(*buf)) {
- dma_memory_read(ehci->as, addr, buf, sizeof(*buf),
- MEMTXATTRS_UNSPECIFIED);
+ dma_memory_read_guarded(DEVICE(ehci), ehci->as, addr, buf,
+ sizeof(*buf), MEMTXATTRS_UNSPECIFIED);
*buf = le32_to_cpu(*buf);
}
@@ -406,8 +406,8 @@ static inline int put_dwords(EHCIState *ehci, uint32_t addr,
for (i = 0; i < num; i++, buf++, addr += sizeof(*buf)) {
uint32_t tmp = cpu_to_le32(*buf);
- dma_memory_write(ehci->as, addr, &tmp, sizeof(tmp),
- MEMTXATTRS_UNSPECIFIED);
+ dma_memory_write_guarded(DEVICE(ehci), ehci->as, addr, &tmp,
+ sizeof(tmp), MEMTXATTRS_UNSPECIFIED);
}
return num;
--
2.27.0
- [PATCH v3 0/7] memory: prevent dma-reentracy issues, Alexander Bulekov, 2022/10/28
- [PATCH v3 1/7] memory: associate DMA accesses with the initiator Device, Alexander Bulekov, 2022/10/28
- [PATCH v3 2/7] dma-helpers: switch to guarded DMA accesses, Alexander Bulekov, 2022/10/28
- [PATCH v3 6/7] xhci: switch to guarded DMA accesses, Alexander Bulekov, 2022/10/28
- [PATCH v3 3/7] ahci: switch to guarded DMA acccesses, Alexander Bulekov, 2022/10/28
- [PATCH v3 4/7] sdhci: switch to guarded DMA accesses, Alexander Bulekov, 2022/10/28
- [PATCH v3 7/7] usb/libhw: switch to guarded DMA accesses, Alexander Bulekov, 2022/10/28
- [PATCH v3 5/7] ehci: switch to guarded DMA accesses,
Alexander Bulekov <=