diff options
Diffstat (limited to 'exec.c')
| -rw-r--r-- | exec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/exec.c b/exec.c index ff16f04f2b..b1db12fe36 100644 --- a/exec.c +++ b/exec.c @@ -486,7 +486,8 @@ static MemoryRegionSection address_space_do_translate(AddressSpace *as, break; } - iotlb = mr->iommu_ops->translate(mr, addr, is_write); + iotlb = mr->iommu_ops->translate(mr, addr, is_write ? + IOMMU_WO : IOMMU_RO); addr = ((iotlb.translated_addr & ~iotlb.addr_mask) | (addr & iotlb.addr_mask)); *plen = MIN(*plen, (addr | iotlb.addr_mask) - addr + 1); |