spapr: Do TPM proxy hotplug sanity checks at pre-plug
commitac96807b0245f08d969a8faf0c8c754514bb6c10
authorGreg Kurz <groug@kaod.org>
Fri, 20 Nov 2020 23:42:07 +0000 (21 00:42 +0100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Mon, 14 Dec 2020 04:50:55 +0000 (14 15:50 +1100)
tree9174b9b1b4f0872f042a89cc6382e1e24dc41493
parent9a07069958705f426180829f807f0b84ec295b93
spapr: Do TPM proxy hotplug sanity checks at pre-plug

There can be only one TPM proxy at a time. This is currently
checked at plug time. But this can be detected at pre-plug in
order to error out earlier.

This allows to get rid of error handling in the plug handler.

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