summaryrefslogtreecommitdiffstats
path: root/include/hw/ppc/spapr_xive.h
diff options
context:
space:
mode:
authorCédric Le Goater2019-05-13 10:42:42 +0200
committerDavid Gibson2019-05-29 03:39:46 +0200
commitae805ea9073bb97363d867ef081be27e2c63d782 (patch)
tree43b5ad65695fbf14bf072dfe2ade6f83748a9286 /include/hw/ppc/spapr_xive.h
parentspapr: check for the activation of the KVM IRQ device (diff)
downloadqemu-ae805ea9073bb97363d867ef081be27e2c63d782.tar.gz
qemu-ae805ea9073bb97363d867ef081be27e2c63d782.tar.xz
qemu-ae805ea9073bb97363d867ef081be27e2c63d782.zip
spapr/irq: introduce a spapr_irq_init_device() helper
The way the XICS and the XIVE devices are initialized follows the same pattern. First, try to connect to the KVM device and if not possible fallback on the emulated device, unless a kernel_irqchip is required. The spapr_irq_init_device() routine implements this sequence in generic way using new sPAPR IRQ handlers ->init_emu() and ->init_kvm(). The XIVE init sequence is moved under the associated sPAPR IRQ ->init() handler. This will change again when KVM support is added for the dual interrupt mode. Signed-off-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20190513084245.25755-12-clg@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'include/hw/ppc/spapr_xive.h')
-rw-r--r--include/hw/ppc/spapr_xive.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/ppc/spapr_xive.h b/include/hw/ppc/spapr_xive.h
index 0b5e972d52..b26befcf6b 100644
--- a/include/hw/ppc/spapr_xive.h
+++ b/include/hw/ppc/spapr_xive.h
@@ -66,6 +66,7 @@ void spapr_xive_map_mmio(SpaprXive *xive);
int spapr_xive_end_to_target(uint8_t end_blk, uint32_t end_idx,
uint32_t *out_server, uint8_t *out_prio);
+void spapr_xive_init(SpaprXive *xive, Error **errp);
/*
* KVM XIVE device helpers