On Tue, 15 Sep 2020 12:18:35 +0300
Vladimir Sementsov-Ogievskiy <[email protected]> wrote:
> 14.09.2020 15:34, Greg Kurz wrote:
> > As recommended in "qapi/error.h", indicate success / failure with a
> > return value. Since ppc_set_compat() is called from a VMState handler,
>
> What handler do you mean? You don't update any handlers here..
>
One of the callers of ppc_set_compat() is
static int cpu_post_load(void *opaque, int version_id)
{
}
in target/ppc/machine.c, which gets fixed in patch 3. I mention this to
justify the choice of an int rather than a bool.
> > let's make it an int so that it propagates any negative errno returned
> > by kvmppc_set_compat(). Do the same for ppc_set_compat_all() for
> > consistency, even if it isn't called in a context where a negative errno
> > is required on failure.
> >
> > This will allow to simplify error handling in the callers.
> >
> > Signed-off-by: Greg Kurz <[email protected]>
>
> patch is OK:
> Reviewed-by: Vladimir Sementsov-Ogievskiy <[email protected]>
>