qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 11/14] vfio: Extend vfio_set_migration_error() with Error* ar


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 11/14] vfio: Extend vfio_set_migration_error() with Error* argument
Date: Wed, 7 Feb 2024 21:25:29 +0100
User-agent: Mozilla Thunderbird

On 7/2/24 14:33, Cédric Le Goater wrote:
vfio_set_migration_error() sets the 'return' error on the migration
stream if a migration is in progress. To improve error reporting, add
a new Error* argument to also set the Error object on the migration
stream.

Signed-off-by: Cédric Le Goater <clg@redhat.com>
---
  hw/vfio/common.c | 50 +++++++++++++++++++++++++++++-------------------
  1 file changed, 30 insertions(+), 20 deletions(-)


-static void vfio_set_migration_error(int err)
+static void vfio_set_migration_error(int ret, Error *err)

Maybe rename vfio_report_migration_error() for clarity?

  {
      MigrationState *ms = migrate_get_current();
if (migration_is_setup_or_active(ms->state)) {
          WITH_QEMU_LOCK_GUARD(&ms->qemu_file_lock) {
              if (ms->to_dst_file) {
-                qemu_file_set_error(ms->to_dst_file, err);
+                qemu_file_set_error_obj(ms->to_dst_file, ret, err);
              }
          }
+    } else {
+        error_report_err(err);
      }
  }




reply via email to

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