On Thu, Jul 17, 2025 at 06:07:43AM +0530, Arun Menon wrote: > This is an incremental step in converting vmstate loading > code to report error via Error objects instead of directly > printing it to console/monitor. > It is ensured that qemu_load_device_state() must report an error > in errp, in case of failure. > > Signed-off-by: Arun Menon <arme...@redhat.com> > --- > migration/colo.c | 5 +++-- > migration/savevm.c | 6 +++--- > migration/savevm.h | 2 +- > 3 files changed, 7 insertions(+), 6 deletions(-) > > diff --git a/migration/colo.c b/migration/colo.c > index > ddc628cab4194b3cb82388c5e878286c820004b2..7291df0d47d8e308f8b71973c908b5a05ec7f4d7 > 100644 > --- a/migration/colo.c > +++ b/migration/colo.c > @@ -730,9 +730,10 @@ static void > colo_incoming_process_checkpoint(MigrationIncomingState *mis, > bql_lock(); > vmstate_loading = true; > colo_flush_ram_cache(); > - ret = qemu_load_device_state(fb); > + ret = qemu_load_device_state(fb, &local_err);
Just use 'errp' here > if (ret < 0) { > - error_setg(errp, "COLO: load device state failed"); > + error_propagate_prepend(errp, local_err, > + "COLO: load device state failed"); > vmstate_loading = false; > bql_unlock(); > return; With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|