qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/6] exec/memory: Introduce the translate_size function withi


From: David Hildenbrand
Subject: Re: [PATCH 1/6] exec/memory: Introduce the translate_size function within the IOMMU class
Date: Wed, 25 Oct 2023 16:56:22 +0200
User-agent: Mozilla Thunderbird

On 25.10.23 07:14, Ethan Chen wrote:
IOMMU have size information during translation.


Can you add some more information why we would want this and how the backend can do "better" things with the size at hand?

Note that I was not CCed on the cover letter.

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:
       *

--
Cheers,

David / dhildenb




reply via email to

[Prev in Thread] Current Thread [Next in Thread]