spapr: add device tree support for the XIVE exploitation mode
commit6e21de4a50fa1caf163e12a6c90424b750119f96
authorCédric Le Goater <clg@kaod.org>
Tue, 11 Dec 2018 22:38:14 +0000 (11 23:38 +0100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 20 Dec 2018 22:39:07 +0000 (21 09:39 +1100)
treed4a898138b813002a15d0dc60619929bcba8d27a
parent23bcd5eb9a472cc7bd147403d9ba18e293ee6adc
spapr: add device tree support for the XIVE exploitation mode

The XIVE interface for the guest is described in the device tree under
the "interrupt-controller" node. A couple of new properties are
specific to XIVE :

 - "reg"

   contains the base address and size of the thread interrupt
   managnement areas (TIMA), for the User level and for the Guest OS
   level. Only the Guest OS level is taken into account today.

 - "ibm,xive-eq-sizes"

   the size of the event queues. One cell per size supported, contains
   log2 of size, in ascending order.

 - "ibm,xive-lisn-ranges"

   the IRQ interrupt number ranges assigned to the guest for the IPIs.

and also under the root node :

 - "ibm,plat-res-int-priorities"

   contains a list of priorities that the hypervisor has reserved for
   its own use. OPAL uses the priority 7 queue to automatically
   escalate interrupts for all other queues (DD2.X POWER9). So only
   priorities [0..6] are allowed for the guest.

Extend the sPAPR IRQ backend with a new handler to populate the DT
with the appropriate "interrupt-controller" node.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
[dwg: Fix style nits]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/intc/spapr_xive.c
hw/intc/xics_spapr.c
hw/ppc/spapr.c
hw/ppc/spapr_irq.c
include/hw/ppc/spapr_irq.h
include/hw/ppc/spapr_xive.h
include/hw/ppc/xics.h