]> git.ipfire.org Git - thirdparty/qemu.git/commit
vfio: return mr from vfio_get_xlat_addr
authorSteve Sistare <steven.sistare@oracle.com>
Mon, 19 May 2025 13:26:43 +0000 (06:26 -0700)
committerCédric Le Goater <clg@redhat.com>
Thu, 5 Jun 2025 08:40:38 +0000 (10:40 +0200)
commite3353d63e15d0b1109257d55e265a889e8c508f8
tree96b2a49d6ac332001c7f9866b3d49894f4ba0ad9
parent0992ea07dbb58d347c37d31e65d87893280b7f23
vfio: return mr from vfio_get_xlat_addr

Modify memory_get_xlat_addr and vfio_get_xlat_addr to return the memory
region that the translated address is found in.  This will be needed by
CPR in a subsequent patch to map blocks using IOMMU_IOAS_MAP_FILE.

Also return the xlat offset, so we can simplify the interface by removing
the out parameters that can be trivially derived from mr and xlat.

Lastly, rename the functions to  to memory_translate_iotlb() and
vfio_translate_iotlb().

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: John Levon <john.levon@nutanix.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Link: https://lore.kernel.org/qemu-devel/1747661203-136490-1-git-send-email-steven.sistare@oracle.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
hw/vfio/listener.c
hw/virtio/vhost-vdpa.c
include/system/memory.h
system/memory.c