qemu-e2k/include/hw/ppc
Cédric Le Goater 207d9fe985 ppc/xive: introduce the XIVE interrupt thread context
Each POWER9 processor chip has a XIVE presenter that can generate four
different exceptions to its threads:

  - hypervisor exception,
  - O/S exception
  - Event-Based Branch (EBB)
  - msgsnd (doorbell).

Each exception has a state independent from the others called a Thread
Interrupt Management context. This context is a set of registers which
lets the thread handle priority management and interrupt acknowledgment
among other things. The most important ones being :

  - Interrupt Priority Register  (PIPR)
  - Interrupt Pending Buffer     (IPB)
  - Current Processor Priority   (CPPR)
  - Notification Source Register (NSR)

These registers are accessible through a specific MMIO region, called
the Thread Interrupt Management Area (TIMA), four aligned pages, each
exposing a different view of the registers. First page (page address
ending in 0b00) gives access to the entire context and is reserved for
the ring 0 view for the physical thread context. The second (page
address ending in 0b01) is for the hypervisor, ring 1 view. The third
(page address ending in 0b10) is for the operating system, ring 2
view. The fourth (page address ending in 0b11) is for user level, ring
3 view.

The thread interrupt context is modeled with a XiveTCTX object
containing the values of the different exception registers. The TIMA
region is mapped at the same address for each CPU.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-12-21 09:29:12 +11:00
..
fdt.h
mac_dbdma.h
openpic_kvm.h openpic: move KVM-specific declarations into separate openpic_kvm.h file 2018-03-06 13:16:29 +11:00
openpic.h mac_newworld: simplify IRQ wiring 2018-12-21 09:24:23 +11:00
pnv_core.h
pnv_lpc.h ppc/pnv: introduce a new isa_create() operation to the chip model 2018-06-21 21:22:53 +10:00
pnv_occ.h
pnv_psi.h ppc/pnv: Remove unused XICSState reference 2017-07-17 15:07:05 +10:00
pnv_xscom.h
pnv.h ppc/pnv: introduce Pnv8Chip and Pnv9Chip models 2018-06-21 21:22:53 +10:00
ppc4xx.h
ppc_e500.h
ppc.h
spapr_cpu_core.h spapr_cpu_core: migrate per-CPU data 2018-06-21 21:22:53 +10:00
spapr_drc.h Include less of the generated modular QAPI headers 2018-03-02 13:45:50 -06:00
spapr_irq.h spapr: introduce a spapr_irq_init() routine 2018-12-21 09:28:47 +11:00
spapr_ovec.h spapr: Support ibm,dynamic-memory-v2 property 2018-04-27 18:05:23 +10:00
spapr_rtas.h
spapr_vio.h spapr: introduce a spapr_qirq() helper 2017-12-15 09:49:24 +11:00
spapr.h spapr: export and rename the xics_max_server_number() routine 2018-12-21 09:29:10 +11:00
xics.h spapr: introduce a spapr_irq class 'nr_msis' attribute 2018-09-25 11:12:25 +10:00
xive_regs.h ppc/xive: introduce the XIVE interrupt thread context 2018-12-21 09:29:12 +11:00
xive.h ppc/xive: introduce the XIVE interrupt thread context 2018-12-21 09:29:12 +11:00