spapr/irq: initialize the IRQ device only once

Add a check to make sure that the routine initializing the emulated
IRQ device is called once. We don't have much to test on the XICS
side, so we introduce a 'init' boolean under ICSState.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20190513084245.25755-13-clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
Cédric Le Goater 2019-05-13 10:42:43 +02:00 committed by David Gibson
parent ae805ea907
commit cf435df697
3 changed files with 17 additions and 0 deletions

View file

@ -119,6 +119,7 @@ struct ICSState {
uint32_t offset;
ICSIRQState *irqs;
XICSFabric *xics;
bool init; /* sPAPR ICS device initialized */
};
#define ICS_PROP_XICS "xics"