From: "Cédric Le Goater" <clg@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org,
"Alex Williamson" <alex.williamson@redhat.com>,
"Peter Xu" <peterx@redhat.com>, "Fabiano Rosas" <farosas@suse.de>,
"Avihai Horon" <avihaih@nvidia.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Prasad Pandit" <pjp@fedoraproject.org>
Subject: Re: [PATCH for-9.1 v5 08/14] migration: Add Error** argument to .load_setup() handler
Date: Wed, 20 Mar 2024 09:41:03 +0100 [thread overview]
Message-ID: <a6e0a011-817b-4e9e-9985-8fb64fa0aa5e@redhat.com> (raw)
In-Reply-To: <87il1htjpc.fsf@pond.sub.org>
On 3/20/24 09:02, Markus Armbruster wrote:
> Cédric Le Goater <clg@redhat.com> writes:
>
>> This will be useful to report errors at a higher level, mostly in VFIO
>> today.
>>
>> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> Reviewed-by: Peter Xu <peterx@redhat.com>
>> Signed-off-by: Cédric Le Goater <clg@redhat.com>
>> ---
>
> [...]
>
>> diff --git a/migration/savevm.c b/migration/savevm.c
>> index 535ad5a32d67057dd172ce25d561a66a07172e97..8f42999a15d1685957de9ed517d6bc9ba49c3f11 100644
>> --- a/migration/savevm.c
>> +++ b/migration/savevm.c
>> @@ -2747,8 +2747,9 @@ static void qemu_loadvm_state_switchover_ack_needed(MigrationIncomingState *mis)
>> trace_loadvm_state_switchover_ack_needed(mis->switchover_ack_pending_num);
>> }
>>
>> -static int qemu_loadvm_state_setup(QEMUFile *f)
>> +static int qemu_loadvm_state_setup(QEMUFile *f, Error **errp)
>> {
>> + ERRP_GUARD(); /* error_prepend use */
>
> The comment is correct, but prone to go stale. No other use of
> ERRP_GUARD() is commented. Suggest to drop it.
OK. I found it interesting, for me at least. Will drop in the VFIO
patches also.
Thanks,
C.
>
>> SaveStateEntry *se;
>> int ret;
>>
>> @@ -2763,10 +2764,11 @@ static int qemu_loadvm_state_setup(QEMUFile *f)
>> }
>> }
>>
>> - ret = se->ops->load_setup(f, se->opaque);
>> + ret = se->ops->load_setup(f, se->opaque, errp);
>> if (ret < 0) {
>> + error_prepend(errp, "Load state of device %s failed: ",
>> + se->idstr);
>> qemu_file_set_error(f, ret);
>> - error_report("Load state of device %s failed", se->idstr);
>> return ret;
>> }
>> }
>> @@ -2947,7 +2949,8 @@ int qemu_loadvm_state(QEMUFile *f)
>> return ret;
>> }
>>
>> - if (qemu_loadvm_state_setup(f) != 0) {
>> + if (qemu_loadvm_state_setup(f, &local_err) != 0) {
>> + error_report_err(local_err);
>> return -EINVAL;
>> }
>
next prev parent reply other threads:[~2024-03-20 8:41 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-20 6:48 [PATCH for-9.1 v5 00/14] migration: Improve error reporting Cédric Le Goater
2024-03-20 6:48 ` [PATCH for-9.1 v5 01/14] s390/stattrib: Add Error** argument to set_migrationmode() handler Cédric Le Goater
2024-03-20 6:48 ` [PATCH for-9.1 v5 02/14] vfio: Always report an error in vfio_save_setup() Cédric Le Goater
2024-03-20 6:48 ` [PATCH for-9.1 v5 03/14] migration: Always report an error in block_save_setup() Cédric Le Goater
2024-03-20 6:49 ` [PATCH for-9.1 v5 04/14] migration: Always report an error in ram_save_setup() Cédric Le Goater
2024-03-20 6:49 ` [PATCH for-9.1 v5 05/14] migration: Add Error** argument to vmstate_save() Cédric Le Goater
2024-03-20 6:49 ` [PATCH for-9.1 v5 06/14] migration: Add Error** argument to qemu_savevm_state_setup() Cédric Le Goater
2024-03-20 14:29 ` Peter Xu
2024-03-20 6:49 ` [PATCH for-9.1 v5 07/14] migration: Add Error** argument to .save_setup() handler Cédric Le Goater
2024-03-29 9:32 ` Vladimir Sementsov-Ogievskiy
2024-03-29 10:53 ` Cédric Le Goater
2024-03-29 11:32 ` Vladimir Sementsov-Ogievskiy
2024-03-20 6:49 ` [PATCH for-9.1 v5 08/14] migration: Add Error** argument to .load_setup() handler Cédric Le Goater
2024-03-20 8:02 ` Markus Armbruster
2024-03-20 8:41 ` Cédric Le Goater [this message]
2024-03-20 6:49 ` [PATCH for-9.1 v5 09/14] memory: Add Error** argument to .log_global_start() handler Cédric Le Goater
2024-03-20 14:42 ` Peter Xu
2024-03-20 16:15 ` Cédric Le Goater
2024-03-20 17:39 ` Peter Xu
2024-03-20 6:49 ` [PATCH for-9.1 v5 10/14] migration: Introduce ram_bitmaps_destroy() Cédric Le Goater
2024-03-20 14:43 ` Peter Xu
2024-03-20 14:49 ` Fabiano Rosas
2024-03-20 6:49 ` [PATCH for-9.1 v5 11/14] memory: Add Error** argument to the global_dirty_log routines Cédric Le Goater
2024-03-20 14:53 ` Fabiano Rosas
2024-03-20 15:18 ` Peter Xu
2024-03-22 1:55 ` Yong Huang
2024-03-22 13:41 ` Peter Xu
2024-03-20 6:49 ` [PATCH for-9.1 v5 12/14] migration: Add Error** argument to ram_state_init() Cédric Le Goater
2024-03-20 14:59 ` Fabiano Rosas
2024-03-20 6:49 ` [PATCH for-9.1 v5 13/14] migration: Add Error** argument to xbzrle_init() Cédric Le Goater
2024-03-20 15:01 ` Fabiano Rosas
2024-03-20 6:49 ` [PATCH for-9.1 v5 14/14] migration: Modify ram_init_bitmaps() to report dirty tracking errors Cédric Le Goater
2024-03-20 15:05 ` Fabiano Rosas
2024-03-22 13:42 ` [PATCH for-9.1 v5 00/14] migration: Improve error reporting Peter Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a6e0a011-817b-4e9e-9985-8fb64fa0aa5e@redhat.com \
--to=clg@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=armbru@redhat.com \
--cc=avihaih@nvidia.com \
--cc=farosas@suse.de \
--cc=peterx@redhat.com \
--cc=philmd@linaro.org \
--cc=pjp@fedoraproject.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).