[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] qxl: remove assert in qxl_pre_save.
From: |
Gerd Hoffmann |
Subject: |
Re: [PATCH 1/2] qxl: remove assert in qxl_pre_save. |
Date: |
Fri, 23 Jul 2021 11:46:13 +0200 |
Hi,
> >> Migration fails and you want know why.
> >>
> >> Reason migration fails is the guest violates qxl specs (which doesn't
> >> cause actual problems unless you want migrate the guest).
> >
> > Then I agree error_report() is better ("Report an error to the current
> > monitor if we have one, else stderr").
>
> No good for QMP, I'm afraid.
>
> error_report() reports to stderr in QMP monitor context. To get an
> error to the QMP client, you need to use error_setg() and propagate all
> the way to the QMP core.
>
> Back to the patch. If the thing we report is actually an *error*,
> i.e. something that makes migration fail, then the QMP failure will
> contain an error message. That error must come from further up the call
> stack. If it's good enough, we don't need error_report() here. Else,
> we should error_setg() here.
Caller is here (migration/vmstate.c):
int vmstate_save_state_v(QEMUFile *f, const VMStateDescription *vmsd,
void *opaque, JSONWriter *vmdesc, int version_id)
{
[ ... ]
if (vmsd->pre_save) {
ret = vmsd->pre_save(opaque);
trace_vmstate_save_state_pre_save_res(vmsd->name, ret);
if (ret) {
error_report("pre-save failed: %s", vmsd->name);
return ret;
}
}
[ ... ]
}
No error_setg() anywhere close, it's error_report() all over the place.
I guess that makes adding error_report() the only short-term (aka 6.1)
option.
take care,
Gerd
- [PATCH 0/2] qxl: remove assert and migration blocker, Gerd Hoffmann, 2021/07/21
- [PATCH 1/2] qxl: remove assert in qxl_pre_save., Gerd Hoffmann, 2021/07/21
- Re: [PATCH 1/2] qxl: remove assert in qxl_pre_save., Marc-André Lureau, 2021/07/21
- Re: [PATCH 1/2] qxl: remove assert in qxl_pre_save., Dr. David Alan Gilbert, 2021/07/22
- Re: [PATCH 1/2] qxl: remove assert in qxl_pre_save., Gerd Hoffmann, 2021/07/23
- Re: [PATCH 1/2] qxl: remove assert in qxl_pre_save., Philippe Mathieu-Daudé, 2021/07/23
- Re: [PATCH 1/2] qxl: remove assert in qxl_pre_save., Gerd Hoffmann, 2021/07/23
- Re: [PATCH 1/2] qxl: remove assert in qxl_pre_save., Philippe Mathieu-Daudé, 2021/07/23
- Re: [PATCH 1/2] qxl: remove assert in qxl_pre_save., Markus Armbruster, 2021/07/23
- Re: [PATCH 1/2] qxl: remove assert in qxl_pre_save.,
Gerd Hoffmann <=
[PATCH 2/2] Revert "qxl: add migration blocker to avoid pre-save assert", Gerd Hoffmann, 2021/07/21