spapr: Remove SpaprIrq::init_kvm hook
commit0a17e0c39f73080e6d5c4d9a2033a5bd475c416c
authorDavid Gibson <david@gibson.dropbear.id.au>
Thu, 26 Sep 2019 13:02:41 +0000 (26 23:02 +1000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Wed, 23 Oct 2019 22:36:55 +0000 (24 09:36 +1100)
tree975154567929a2b8ad2ea251a9782331b8ed8612
parent98a39a7927b510fcdd29f8237b67368a66121c84
spapr: Remove SpaprIrq::init_kvm hook

This hook is a bit odd.  The only caller is spapr_irq_init_kvm(), but
it explicitly takes an SpaprIrq *, so it's never really called through the
current SpaprIrq.  Essentially this is just a way of passing through a
function pointer so that spapr_irq_init_kvm() can handle some
configuration and error handling logic without duplicating it between the
xics and xive reset paths.

So, make it just take that function pointer.  Because of earlier reworks
to the KVM connect/disconnect code in the xics and xive backends we can
also eliminate some wrapper functions and streamline error handling a bit.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
hw/ppc/spapr_irq.c
include/hw/ppc/spapr_irq.h