summary refs log tree commit diff stats
path: root/hw/core/sysbus-fdt.c
diff options
context:
space:
mode:
authorCédric Le Goater <clg@redhat.com>2025-03-24 13:33:15 +0100
committerCédric Le Goater <clg@redhat.com>2025-04-25 09:01:37 +0200
commit10c7f1cf2c9d5af28dbc342634eb1f3979a7c379 (patch)
tree81f5412a5a364af9a65df0c37d0fc1a80baa40e3 /hw/core/sysbus-fdt.c
parent5dbe25e9db070ea87c173fd9a4dc0932ee6d1b41 (diff)
downloadfocaccia-qemu-10c7f1cf2c9d5af28dbc342634eb1f3979a7c379.tar.gz
focaccia-qemu-10c7f1cf2c9d5af28dbc342634eb1f3979a7c379.zip
vfio: Open code vfio_migration_set_error()
VFIO uses migration_file_set_error() in a couple of places where an
'Error **' parameter is not provided. In MemoryListener handlers :

  vfio_listener_region_add
  vfio_listener_log_global_stop
  vfio_listener_log_sync

and in callback routines for IOMMU notifiers :

  vfio_iommu_map_notify
  vfio_iommu_map_dirty_notify

Hopefully, one day, we will be able to extend these callbacks with an
'Error **' parameter and avoid setting the global migration error.
Until then, it seems sensible to clearly identify the use cases, which
are limited, and open code vfio_migration_set_error(). One other
benefit is an improved error reporting when migration is running.

While at it, slightly modify error reporting to only report errors
when migration is not active and not always as is currently done.

Cc: Prasad Pandit <pjp@fedoraproject.org>
Reviewed-by: Avihai Horon <avihaih@nvidia.com>
Link: https://lore.kernel.org/qemu-devel/20250324123315.637827-1-clg@redhat.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'hw/core/sysbus-fdt.c')
0 files changed, 0 insertions, 0 deletions