@@ -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;
Signed-off-by: Alexander Bulekov <alxndr@bu.edu> --- hw/usb/hcd-ehci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)