[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/6] exec/memory: Introduce the translate_size function within th
From: |
Ethan Chen |
Subject: |
[PATCH 1/6] exec/memory: Introduce the translate_size function within the IOMMU class |
Date: |
Wed, 25 Oct 2023 13:14:25 +0800 |
IOMMU have size information during translation.
Signed-off-by: Ethan Chen <ethan84@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