diff options
author | Le Tan <tamlokveer@gmail.com> | 2014-08-16 13:55:37 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2014-08-28 23:10:22 +0200 |
commit | 8d7b8cb9c22b7aa809050800a62e89f869054b35 (patch) | |
tree | e42fa8c57fb67152d077d126c151819e815dffd1 /exec.c | |
parent | 187de915e8d06aaf82be206aebc551c82bf0670c (diff) | |
download | qemu-8d7b8cb9c22b7aa809050800a62e89f869054b35.zip qemu-8d7b8cb9c22b7aa809050800a62e89f869054b35.tar.gz qemu-8d7b8cb9c22b7aa809050800a62e89f869054b35.tar.bz2 |
iommu: add is_write as a parameter to the translate function of MemoryRegionIOMMUOps
Add a bool variable is_write as a parameter to the translate function of
MemoryRegionIOMMUOps to indicate the operation of the access. It can be
used for correct fault reporting from within the callback.
Change the interface of related functions.
Signed-off-by: Le Tan <tamlokveer@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'exec.c')
-rw-r--r-- | exec.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -373,7 +373,7 @@ MemoryRegion *address_space_translate(AddressSpace *as, hwaddr addr, break; } - iotlb = mr->iommu_ops->translate(mr, addr); + iotlb = mr->iommu_ops->translate(mr, addr, is_write); addr = ((iotlb.translated_addr & ~iotlb.addr_mask) | (addr & iotlb.addr_mask)); len = MIN(len, (addr | iotlb.addr_mask) - addr + 1); |