spapr: Do PHB hoplug sanity check at pre-plug
commit9a07069958705f426180829f807f0b84ec295b93
authorGreg Kurz <groug@kaod.org>
Fri, 20 Nov 2020 23:42:06 +0000 (21 00:42 +0100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Mon, 14 Dec 2020 04:50:55 +0000 (14 15:50 +1100)
tree5daab708a5a07be4526f893e3ec9ced75da29adc
parentf5598c92b84047c395836985715ff62c856ff2fe
spapr: Do PHB hoplug sanity check at pre-plug

We currently detect that a PHB index is already in use at plug time.
But this can be decteted at pre-plug in order to error out earlier.

This allows to pass &error_abort to spapr_drc_attach() and to end
up with a plug handler that doesn't need to report errors anymore.

Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <20201120234208.683521-8-groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/spapr.c