pseries: Fix initialization of sPAPREnvironment structure
authorDavid Gibson <david@gibson.dropbear.id.au>
Tue, 1 Nov 2011 16:49:05 +0000 (16:49 +0000)
committerAlexander Graf <agraf@suse.de>
Fri, 11 Nov 2011 16:33:58 +0000 (17:33 +0100)
commit4c76a52496dce04e367bf04b8df0f045b4660dae
treee7551f91a8858930e2a29125023738ea7b72b89e
parent575209a412e515e27a634027724b0c634123f1f4
pseries: Fix initialization of sPAPREnvironment structure

Since we added PCI support to the pseries machine, we include a qlist of
PCI host bridges in the sPAPREnvironment structure.  However this list
was never properly initialized it.  Somehow we got away with this until
some other recent change broke it, and we now segfault immediately on
startup.

This patch adds the required QLIST_INIT(), and while we're at it makes sure
we initialize the rest of the sPAPREnvironment structure to 0, to avoid
future nasty surprises.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
hw/spapr.c