spapr/xive: Deduce the SpaprXive pointer from XiveTCTX::xptr
commit74e51a38f74537d7260f0d45fb01e675f1558163
authorGreg Kurz <groug@kaod.org>
Mon, 6 Jan 2020 14:56:42 +0000 (6 15:56 +0100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Wed, 8 Jan 2020 00:01:59 +0000 (8 11:01 +1100)
tree625dab96f6f9987a9ce24945e69e8b5e9a118b43
parent479509463b4dc126d2324f046c5e92bd5f0160ef
spapr/xive: Deduce the SpaprXive pointer from XiveTCTX::xptr

And use it instead of reaching out to the machine. This allows to get rid
of a call to qdev_get_machine() and to reduce the scope of another one so
that it is only used within the argument list of error_append_hint(). This
is an acceptable tradeoff compared to all it would require to know about
the maximum number of CPUs here without calling qdev_get_machine().

Signed-off-by: Greg Kurz <groug@kaod.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20200106145645.4539-10-clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/intc/spapr_xive_kvm.c