diff options
author | Cédric Le Goater <clg@redhat.com> | 2024-05-16 14:46:56 +0200 |
---|---|---|
committer | Cédric Le Goater <clg@redhat.com> | 2024-05-16 16:59:19 +0200 |
commit | ebb481c03c22eaf052b02c37ddd53989a078b771 (patch) | |
tree | dd4b890ff0ff8b3ba69f9b72208f52a851270e37 /hw/virtio | |
parent | 94d12088409b9544dd4e191e2971c47ecec4c315 (diff) | |
download | qemu-ebb481c03c22eaf052b02c37ddd53989a078b771.zip qemu-ebb481c03c22eaf052b02c37ddd53989a078b771.tar.gz qemu-ebb481c03c22eaf052b02c37ddd53989a078b771.tar.bz2 |
memory: Add Error** argument to memory_get_xlat_addr()
Let the callers do the reporting. This will be useful in
vfio_iommu_map_dirty_notify().
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: David Hildenbrand <david@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Avihai Horon <avihaih@nvidia.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'hw/virtio')
-rw-r--r-- | hw/virtio/vhost-vdpa.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index e827b91..ed99ab8 100644 --- a/hw/virtio/vhost-vdpa.c +++ b/hw/virtio/vhost-vdpa.c @@ -208,6 +208,7 @@ static void vhost_vdpa_iommu_map_notify(IOMMUNotifier *n, IOMMUTLBEntry *iotlb) void *vaddr; int ret; Int128 llend; + Error *local_err = NULL; if (iotlb->target_as != &address_space_memory) { error_report("Wrong target AS \"%s\", only system memory is allowed", @@ -227,7 +228,9 @@ static void vhost_vdpa_iommu_map_notify(IOMMUNotifier *n, IOMMUTLBEntry *iotlb) if ((iotlb->perm & IOMMU_RW) != IOMMU_NONE) { bool read_only; - if (!memory_get_xlat_addr(iotlb, &vaddr, NULL, &read_only, NULL)) { + if (!memory_get_xlat_addr(iotlb, &vaddr, NULL, &read_only, NULL, + &local_err)) { + error_report_err(local_err); return; } ret = vhost_vdpa_dma_map(s, VHOST_VDPA_GUEST_PA_ASID, iova, |