diff options
author | Cédric Le Goater <clg@kaod.org> | 2019-01-02 06:57:43 +0100 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2019-01-09 09:28:14 +1100 |
commit | 3a8eb78e6c135422017888380db091793039b6dd (patch) | |
tree | 0e6011b3ec47674859cd12a6e77ae8a8387f70a8 /hw/ppc/spapr_irq.c | |
parent | 13db0cd9b853225e0061c95e922af8fd044473b1 (diff) | |
download | qemu-3a8eb78e6c135422017888380db091793039b6dd.zip qemu-3a8eb78e6c135422017888380db091793039b6dd.tar.gz qemu-3a8eb78e6c135422017888380db091793039b6dd.tar.bz2 |
spapr: enable XIVE MMIOs at reset
Depending on the interrupt mode of the machine, enable or disable the
XIVE MMIOs.
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc/spapr_irq.c')
-rw-r--r-- | hw/ppc/spapr_irq.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/ppc/spapr_irq.c b/hw/ppc/spapr_irq.c index d110b8c..5fce72f 100644 --- a/hw/ppc/spapr_irq.c +++ b/hw/ppc/spapr_irq.c @@ -375,6 +375,9 @@ static void spapr_irq_reset_xive(sPAPRMachineState *spapr, Error **errp) /* (TCG) Set the OS CAM line of the thread interrupt context. */ spapr_xive_set_tctx_os_cam(cpu->tctx); } + + /* Activate the XIVE MMIOs */ + spapr_xive_mmio_set_enabled(spapr->xive, true); } static void spapr_irq_set_irq_xive(void *opaque, int srcno, int val) @@ -549,6 +552,12 @@ static int spapr_irq_post_load_dual(sPAPRMachineState *spapr, int version_id) static void spapr_irq_reset_dual(sPAPRMachineState *spapr, Error **errp) { + /* + * Deactivate the XIVE MMIOs. The XIVE backend will reenable them + * if selected. + */ + spapr_xive_mmio_set_enabled(spapr->xive, false); + spapr_irq_current(spapr)->reset(spapr, errp); } |