ppc/xive: introduce a XIVE interrupt source model
commit02e3ff548d2379c16990bac9cb84833231e0d20f
authorCédric Le Goater <clg@kaod.org>
Wed, 5 Dec 2018 23:22:15 +0000 (6 00:22 +0100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 20 Dec 2018 22:24:23 +0000 (21 09:24 +1100)
tree2bb845b39196e0c93087d1b66b64fdcbcdbd98b8
parent2104d4f5bc8f296b3f6f9272bceb8ecfb9581043
ppc/xive: introduce a XIVE interrupt source model

The first sub-engine of the overall XIVE architecture is the Interrupt
Virtualization Source Engine (IVSE). An IVSE can be integrated into
another logic, like in a PCI PHB or in the main interrupt controller
to manage IPIs.

Each IVSE instance is associated with an Event State Buffer (ESB) that
contains a two bit state entry for each possible event source. When an
event is signaled to the IVSE, by MMIO or some other means, the
associated interrupt state bits are fetched from the ESB and
modified. Depending on the resulting ESB state, the event is forwarded
to the IVRE sub-engine of the controller doing the routing.

Each supported ESB entry is associated with either a single or a
even/odd pair of pages which provides commands to manage the source:
to EOI, to turn off the source for instance.

On a sPAPR machine, the O/S will obtain the page address of the ESB
entry associated with a source and its characteristic using the
H_INT_GET_SOURCE_INFO hcall. On PowerNV, a similar OPAL call is used.

The xive_source_notify() routine is in charge forwarding the source
event notification to the routing engine. It will be filled later on.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
default-configs/ppc64-softmmu.mak
hw/intc/Makefile.objs
hw/intc/xive.c [new file with mode: 0644]
include/hw/ppc/xive.h [new file with mode: 0644]