summary refs log tree commit diff stats
path: root/backends/iommufd.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2025-09-30 14:35:25 +0200
committerCédric Le Goater <clg@redhat.com>2025-10-02 10:41:23 +0200
commit70a7e33ddb7f2ca7caacf286222bd80fd330c454 (patch)
tree512b25118e060acf3bf8be416fd9c3f2ca9a2f44 /backends/iommufd.c
parent1d9a832b58be63e53ef0d2342c271a34ecb349db (diff)
downloadfocaccia-qemu-70a7e33ddb7f2ca7caacf286222bd80fd330c454.tar.gz
focaccia-qemu-70a7e33ddb7f2ca7caacf286222bd80fd330c454.zip
system/iommufd: Use uint64_t type for IOVA mapping size
The 'ram_addr_t' type is described as:

  a QEMU internal address space that maps guest RAM physical
  addresses into an intermediate address space that can map
  to host virtual address spaces.

This doesn't represent well an IOVA mapping size. Simply use
the uint64_t type.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250930123528.42878-2-philmd@linaro.org
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'backends/iommufd.c')
-rw-r--r--backends/iommufd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/backends/iommufd.c b/backends/iommufd.c
index 2a33c7ab0b..fdfb7c9d67 100644
--- a/backends/iommufd.c
+++ b/backends/iommufd.c
@@ -197,7 +197,7 @@ void iommufd_backend_free_id(IOMMUFDBackend *be, uint32_t id)
 }
 
 int iommufd_backend_map_dma(IOMMUFDBackend *be, uint32_t ioas_id, hwaddr iova,
-                            ram_addr_t size, void *vaddr, bool readonly)
+                            uint64_t size, void *vaddr, bool readonly)
 {
     int ret, fd = be->fd;
     struct iommu_ioas_map map = {
@@ -230,7 +230,7 @@ int iommufd_backend_map_dma(IOMMUFDBackend *be, uint32_t ioas_id, hwaddr iova,
 }
 
 int iommufd_backend_map_file_dma(IOMMUFDBackend *be, uint32_t ioas_id,
-                                 hwaddr iova, ram_addr_t size,
+                                 hwaddr iova, uint64_t size,
                                  int mfd, unsigned long start, bool readonly)
 {
     int ret, fd = be->fd;
@@ -268,7 +268,7 @@ int iommufd_backend_map_file_dma(IOMMUFDBackend *be, uint32_t ioas_id,
 }
 
 int iommufd_backend_unmap_dma(IOMMUFDBackend *be, uint32_t ioas_id,
-                              hwaddr iova, ram_addr_t size)
+                              hwaddr iova, uint64_t size)
 {
     int ret, fd = be->fd;
     struct iommu_ioas_unmap unmap = {