Function panda_sys::memory_region_notify_iommu[][src]

pub unsafe extern "C" fn memory_region_notify_iommu(
    mr: *mut MemoryRegion,
    entry: IOMMUTLBEntry
)
Expand description

memory_region_notify_iommu: notify a change in an IOMMU translation entry.

The notification type will be decided by entry.perm bits:

  • For UNMAP (cache invalidation) notifies: set entry.perm to IOMMU_NONE.
  • For MAP (newly added entry) notifies: set entry.perm to the permission of the page (which is definitely !IOMMU_NONE).

Note: for any IOMMU implementation, an in-place mapping change should be notified with an UNMAP followed by a MAP.

@mr: the memory region that was changed @entry: the new entry in the IOMMU translation table. The entry replaces all old entries for the same virtual I/O address range. Deleted entries have .@perm == 0.