IOMMU have size information during translation. Signed-off-by: Ethan Chen <etha...@andestech.com> --- include/exec/memory.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
diff --git a/include/exec/memory.h b/include/exec/memory.h index 9087d02769..5520b7c8c0 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -396,6 +396,25 @@ struct IOMMUMemoryRegionClass { */ IOMMUTLBEntry (*translate)(IOMMUMemoryRegion *iommu, hwaddr addr, IOMMUAccessFlags flag, int iommu_idx); + /** + * @translate_size: + * + * Return a TLB entry that contains a given address and size. + * + * @iommu: the IOMMUMemoryRegion + * + * @hwaddr: address to be translated within the memory region + * + * @size: size to indicate the scope of the entire transaction + * + * @flag: requested access permission + * + * @iommu_idx: IOMMU index for the translation + */ + IOMMUTLBEntry (*translate_size)(IOMMUMemoryRegion *iommu, hwaddr addr, + hwaddr size, IOMMUAccessFlags flag, + int iommu_idx); + /** * @get_min_page_size: * -- 2.34.1