All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC PATCH v2 00/21] Guest exploitation of the XIVE interrupt controller (POWER9)
@ 2017-09-11 17:12 Cédric Le Goater
  2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 01/21] ppc/xive: introduce a skeleton for the sPAPR XIVE interrupt controller Cédric Le Goater
                   ` (21 more replies)
  0 siblings, 22 replies; 90+ messages in thread
From: Cédric Le Goater @ 2017-09-11 17:12 UTC (permalink / raw)
  To: qemu-ppc, qemu-devel, David Gibson, Benjamin Herrenschmidt,
	Alexey Kardashevskiy, Alexander Graf
  Cc: Cédric Le Goater

On a POWER9 sPAPR machine, the Client Architecture Support (CAS)
negotiation process determines whether the guest operates with an
interrupt controller using the XICS legacy model, as found on POWER8,
or in XIVE exploitation mode, the newer POWER9 interrupt model. This
patchset is a proposal to add XIVE support in POWER9 sPAPR machine.

Follows a model for the XIVE interrupt controller and support for the
Hypervisor's calls which are used to configure the interrupt sources
and the event/notification queues of the guest. The last patch
integrates XIVE in the sPAPR machine.

Code is here:

  https://github.com/legoater/qemu/commits/xive

Caveats :

 - IRQ allocator : making progress

   The sPAPR machine make uses of the interrupt controller very early
   in the initialization sequence to allocate IRQ numbers and populate
   the device tree. CAS requires XIVE to be able to switch interrupt
   model and consequently have the models share a common IRQ allocator.   

   I have chosen to link the sPAPR XICS interrupt source into XIVE to
   share the ICSIRQState array which acts as an IRQ allocator. This
   can be improved.

 - Interrupt presenter :

   The register data is directly stored under the ICPState structure
   which is shared with all other sPAPR interrupt controller models.

 - KVM support : not addressed yet

   The guest needs to be run with kernel_irqchip=off on a POWER9 system.

 - LSI : lightly tested.
   
Thanks,

C.

Changes since RFC v1:

 - removed initial complexity due to a tentative try to support
   PowerNV. This will come later.
 - removed specific XIVE interrupt source and presenter models
 - renamed files and typedefs
 - removed print_info() handler
 - introduced a CAS reset to rebuild the device tree
 - linked the XIVE model with the sPAPR XICS interrupt source to share
   the IRQ allocator   
 - improved hcall support (still some missing but they are not used
   under Linux)
 - improved device tree
 - should have addressed comments in first RFC
 - and much more ... Next version should have a better changelog.
 

Cédric Le Goater (21):
  ppc/xive: introduce a skeleton for the sPAPR XIVE interrupt controller
  migration: add VMSTATE_STRUCT_VARRAY_UINT32_ALLOC
  ppc/xive: define the XIVE internal tables
  ppc/xive: provide a link to the sPAPR ICS object under XIVE
  ppc/xive: allocate IRQ numbers for the IPIs
  ppc/xive: introduce handlers for interrupt sources
  ppc/xive: add MMIO handlers for the XIVE interrupt sources
  ppc/xive: describe the XIVE interrupt source flags
  ppc/xive: extend the interrupt presenter model for XIVE
  ppc/xive: add MMIO handlers for the XIVE TIMA
  ppc/xive: push the EQ data in OS event queue
  ppc/xive: notify the CPU when interrupt priority is more privileged
  ppc/xive: handle interrupt acknowledgment by the O/S
  ppc/xive: add support for the SET_OS_PENDING command
  spapr: modify spapr_populate_pci_dt() to use a 'nr_irqs' argument
  spapr: add a XIVE object to the sPAPR machine
  ppc/xive: add hcalls support
  ppc/xive: add device tree support
  ppc/xive: introduce a helper to map the XIVE memory regions
  ppc/xics: introduce a qirq_get() helper in the XICSFabric
  spapr: activate XIVE exploitation mode

 default-configs/ppc64-softmmu.mak |   1 +
 hw/intc/Makefile.objs             |   1 +
 hw/intc/spapr_xive.c              | 821 +++++++++++++++++++++++++++++++++
 hw/intc/spapr_xive_hcall.c        | 930 ++++++++++++++++++++++++++++++++++++++
 hw/intc/xics.c                    |  11 +-
 hw/intc/xive-internal.h           | 189 ++++++++
 hw/ppc/spapr.c                    | 110 ++++-
 hw/ppc/spapr_hcall.c              |   6 +
 hw/ppc/spapr_pci.c                |   4 +-
 include/hw/pci-host/spapr.h       |   2 +-
 include/hw/ppc/spapr.h            |  17 +-
 include/hw/ppc/spapr_xive.h       |  75 +++
 include/hw/ppc/xics.h             |   7 +
 include/migration/vmstate.h       |  10 +
 14 files changed, 2169 insertions(+), 15 deletions(-)
 create mode 100644 hw/intc/spapr_xive.c
 create mode 100644 hw/intc/spapr_xive_hcall.c
 create mode 100644 hw/intc/xive-internal.h
 create mode 100644 include/hw/ppc/spapr_xive.h

-- 
2.13.5

^ permalink raw reply	[flat|nested] 90+ messages in thread

end of thread, other threads:[~2017-11-16 16:49 UTC | newest]

Thread overview: 90+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-11 17:12 [Qemu-devel] [RFC PATCH v2 00/21] Guest exploitation of the XIVE interrupt controller (POWER9) Cédric Le Goater
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 01/21] ppc/xive: introduce a skeleton for the sPAPR XIVE interrupt controller Cédric Le Goater
2017-09-19  2:27   ` David Gibson
2017-09-19 13:15     ` Cédric Le Goater
2017-09-22 11:00       ` David Gibson
2017-09-22 12:42         ` Cédric Le Goater
2017-09-26  3:54           ` David Gibson
2017-09-26  9:45             ` Benjamin Herrenschmidt
2017-11-16 16:48               ` Cédric Le Goater
2017-11-16 15:58             ` Cédric Le Goater
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 02/21] migration: add VMSTATE_STRUCT_VARRAY_UINT32_ALLOC Cédric Le Goater
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 03/21] ppc/xive: define the XIVE internal tables Cédric Le Goater
2017-09-19  2:39   ` David Gibson
2017-09-19 13:46     ` Cédric Le Goater
2017-09-20  4:33       ` David Gibson
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 04/21] ppc/xive: provide a link to the sPAPR ICS object under XIVE Cédric Le Goater
2017-09-11 22:04   ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2017-09-12  5:47     ` Cédric Le Goater
2017-09-19  2:44   ` [Qemu-devel] " David Gibson
2017-09-19 14:46     ` Cédric Le Goater
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 05/21] ppc/xive: allocate IRQ numbers for the IPIs Cédric Le Goater
2017-09-19  2:45   ` David Gibson
2017-09-19 14:52     ` Cédric Le Goater
2017-09-20  4:35       ` David Gibson
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 06/21] ppc/xive: introduce handlers for interrupt sources Cédric Le Goater
2017-09-19  2:48   ` David Gibson
2017-09-19 15:08     ` Cédric Le Goater
2017-09-20  4:38       ` David Gibson
2017-09-21 14:11         ` Cédric Le Goater
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 07/21] ppc/xive: add MMIO handlers for the XIVE " Cédric Le Goater
2017-09-19  2:57   ` David Gibson
2017-09-20 12:54     ` Cédric Le Goater
2017-09-22 10:58       ` David Gibson
2017-09-22 12:26         ` Cédric Le Goater
2017-09-28  8:27       ` Benjamin Herrenschmidt
2017-09-20 13:05     ` Cédric Le Goater
2017-09-28  8:29       ` Benjamin Herrenschmidt
2017-09-28 13:20         ` David Gibson
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 08/21] ppc/xive: describe the XIVE interrupt source flags Cédric Le Goater
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 09/21] ppc/xive: extend the interrupt presenter model for XIVE Cédric Le Goater
2017-09-19  7:36   ` David Gibson
2017-09-19 19:28     ` Cédric Le Goater
2017-09-22 10:58       ` David Gibson
2017-09-22 12:27         ` Cédric Le Goater
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 10/21] ppc/xive: add MMIO handlers for the XIVE TIMA Cédric Le Goater
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 11/21] ppc/xive: push the EQ data in OS event queue Cédric Le Goater
2017-09-19  7:45   ` David Gibson
2017-09-19 19:36     ` Cédric Le Goater
2017-09-20  6:34       ` David Gibson
2017-09-28  8:12         ` Benjamin Herrenschmidt
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 12/21] ppc/xive: notify the CPU when interrupt priority is more privileged Cédric Le Goater
2017-09-19  7:50   ` David Gibson
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 13/21] ppc/xive: handle interrupt acknowledgment by the O/S Cédric Le Goater
2017-09-19  7:53   ` David Gibson
2017-09-20  9:40     ` Cédric Le Goater
2017-09-28  8:14       ` Benjamin Herrenschmidt
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 14/21] ppc/xive: add support for the SET_OS_PENDING command Cédric Le Goater
2017-09-19  7:55   ` David Gibson
2017-09-20  9:47     ` Cédric Le Goater
2017-09-28  8:18       ` Benjamin Herrenschmidt
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 15/21] spapr: modify spapr_populate_pci_dt() to use a 'nr_irqs' argument Cédric Le Goater
2017-09-19  7:56   ` David Gibson
2017-09-20  9:49     ` Cédric Le Goater
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 16/21] spapr: add a XIVE object to the sPAPR machine Cédric Le Goater
2017-09-19  8:38   ` David Gibson
2017-09-20  9:51     ` Cédric Le Goater
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 17/21] ppc/xive: add hcalls support Cédric Le Goater
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 18/21] ppc/xive: add device tree support Cédric Le Goater
2017-09-19  8:44   ` David Gibson
2017-09-20 12:26     ` Cédric Le Goater
2017-09-21  1:35       ` David Gibson
2017-09-21 11:21         ` Cédric Le Goater
2017-09-22 10:54           ` David Gibson
2017-09-28  8:43           ` Benjamin Herrenschmidt
2017-09-28  8:51             ` Cédric Le Goater
2017-09-28 10:03               ` Benjamin Herrenschmidt
2017-09-28 12:50                 ` Cédric Le Goater
2017-09-28  8:31         ` Benjamin Herrenschmidt
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 19/21] ppc/xive: introduce a helper to map the XIVE memory regions Cédric Le Goater
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 20/21] ppc/xics: introduce a qirq_get() helper in the XICSFabric Cédric Le Goater
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 21/21] spapr: activate XIVE exploitation mode Cédric Le Goater
2017-09-19  8:20 ` [Qemu-devel] [RFC PATCH v2 00/21] Guest exploitation of the XIVE interrupt controller (POWER9) David Gibson
2017-09-19  8:46   ` David Gibson
2017-09-20 12:33     ` Cédric Le Goater
2017-09-21  1:25       ` David Gibson
2017-09-21 14:18         ` Cédric Le Goater
2017-09-22 10:33           ` David Gibson
2017-09-22 12:32             ` Cédric Le Goater
2017-09-28  8:23       ` Benjamin Herrenschmidt
2017-09-28 13:17         ` David Gibson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.