aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/iommu.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/iommu.c b/hw/iommu.c
index 6defe61caf..e7d96c81cc 100644
--- a/hw/iommu.c
+++ b/hw/iommu.c
@@ -194,8 +194,7 @@ uint32_t iommu_translate_local(void *opaque, uint32_t addr)
iopte = s->regs[1] << 4;
addr &= ~s->iostart;
iopte += (addr >> (PAGE_SHIFT - 2)) & ~3;
- cpu_physical_memory_read(iopte, (void *) &pa, 4);
- bswap32s(&pa);
+ pa = ldl_phys(iopte);
tmppte = pa;
pa = ((pa & IOPTE_PAGE) << 4) + (addr & PAGE_MASK);
DPRINTF("xlate dva %x => pa %x (iopte[%x] = %x)\n", addr, pa, iopte, tmppte);