diff options
author | Greg Kurz | 2018-06-15 18:58:00 +0200 |
---|---|---|
committer | David Gibson | 2018-06-18 01:43:19 +0200 |
commit | 844afc54ae229515a37f63519855661ad2d01d19 (patch) | |
tree | bb751dd9ea88d52ac27f1182d3b3f6d445b4c2a8 /include/hw/misc/macio/macio.h | |
parent | target/ppc, spapr: Move VPA information to machine_data (diff) | |
download | qemu-844afc54ae229515a37f63519855661ad2d01d19.tar.gz qemu-844afc54ae229515a37f63519855661ad2d01d19.tar.xz qemu-844afc54ae229515a37f63519855661ad2d01d19.zip |
spapr: fix xics_system_init() error path
Commit 3d85885a1b1f3 tried to fix error handling, but it actually
went into the wrong direction by dropping the local Error *.
In the default KVM case, the rationale is to try the in-kernel XICS first,
and if not possible, to fallback to userland XICS. Passing errp everywhere
makes this fallback impossible if errp is &error_fatal (which happens to
be the case). And anyway, if the caller would pass a regular &local_err,
things would be worse: we could possibly pass an already set *errp to
error_setg() and crash, or return an error even in case of success.
So we definitely need a local Error * and only propagate it when we're
done with the fallback logic. This is what this patch does.
Signed-off-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'include/hw/misc/macio/macio.h')
0 files changed, 0 insertions, 0 deletions