All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-2.12 v3 00/11] spapr: introduce an IRQ allocator at the machine level
@ 2017-11-10 15:20 Cédric Le Goater
  2017-11-10 15:20 ` [Qemu-devel] [PATCH for-2.12 v3 01/11] spapr: add pseries 2.12 machine type Cédric Le Goater
                   ` (10 more replies)
  0 siblings, 11 replies; 79+ messages in thread
From: Cédric Le Goater @ 2017-11-10 15:20 UTC (permalink / raw)
  To: qemu-ppc, qemu-devel, David Gibson, Greg Kurz, Benjamin Herrenschmidt
  Cc: Cédric Le Goater

Hello,

Currently, the ICSState 'ics' object of the sPAPR machine acts as the
global interrupt source handler and also as the IRQ number allocator
for the machine. Some IRQ numbers are allocated very early in the
machine initialization sequence to populate the device tree, and this
is a problem to introduce the new POWER XIVE interrupt model, as it
needs to share the IRQ numbers with the older model.

To prepare ground for XIVE, here is a proposal adding a set of new
XICSFabric operations to let the machine handle directly the IRQ
number allocation and to decorrelate the allocation from the interrupt
source object :

    bool (*irq_test)(XICSFabric *xi, int irq);
    int (*irq_alloc_block)(XICSFabric *xi, int count, int align);
    void (*irq_free_block)(XICSFabric *xi, int irq, int num);
    bool (*irq_is_lsi)(XICSFabric *xi, int irq);

In these prototypes, the 'irq' parameter refers to a number in the
global IRQ number space.

On the latest pseries machines, these operations are simply backed by
a bitmap and to handle migration compatibility, we keep an old set of
operations using the ICSIRQState array.


To completely remove the use of the ICSState object (required to
introduce XIVE), we also need to change how the nature of an
interrupt, MSI or LSI, is stored. Today, this is done using the flag
attribute of the ICSIRQState array. We change that by splitting the
IRQ number space of the machine in two: first the LSIs and then the
MSIs. This has the benefit to keep the LSI IRQ numbers in a well known
range which is useful for PHB hotplug.

The git repo for this pachset can be found here along with the latest
XIVE model:

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

Thanks,

C.

Tests :

 - make check on each patch
 - migration :
     qemu-2.12 (pseries-2.12) <->  qemu-2.12 (pseries-2.12)
     qemu-2.12 (pseries-2.10) <->  qemu-2.12 (pseries-2.10)
     qemu-2.10 (pseries-2.10) <->  qemu-2.12 (pseries-2.10)

Changes since v2 :

 - introduced a second set of XICSFabric IRQ operations for older
   pseries machines

Changes since v1 :

 - reorganised patchset to introduce the XICSFabric operations before
   the major changes: bitmap and IRQ number space split   
 - introduced a reference bitmap to save some state in migration

Cédric Le Goater (11):
  spapr: add pseries 2.12 machine type
  ppc/xics: remove useless if condition
  spapr: introduce new XICSFabric operations for an IRQ allocator
  spapr: move current IRQ allocation under the machine
  spapr: introduce an IRQ allocator using a bitmap
  spapr: store a reference IRQ bitmap
  spapr: introduce an 'irq_base' number
  spapr: introduce a XICSFabric irq_is_lsi() operation
  spapr: split the IRQ number space for LSI interrupts
  sparp: merge ics_set_irq_type() in irq_alloc_block() operation
  spapr: use sPAPRMachineState in spapr_ics_ prototypes

 hw/intc/trace-events   |   2 -
 hw/intc/xics.c         |  37 ++++-----
 hw/intc/xics_kvm.c     |   4 +-
 hw/intc/xics_spapr.c   |  76 +++---------------
 hw/ppc/pnv.c           |  34 ++++++++
 hw/ppc/pnv_psi.c       |   4 -
 hw/ppc/spapr.c         | 209 ++++++++++++++++++++++++++++++++++++++++++++++++-
 hw/ppc/spapr_events.c  |   4 +-
 hw/ppc/spapr_pci.c     |   8 +-
 hw/ppc/spapr_vio.c     |   2 +-
 hw/ppc/trace-events    |   2 +
 include/hw/ppc/spapr.h |   5 ++
 include/hw/ppc/xics.h  |  20 +++--
 13 files changed, 301 insertions(+), 106 deletions(-)

-- 
2.13.6

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

end of thread, other threads:[~2017-11-23 14:58 UTC | newest]

Thread overview: 79+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-10 15:20 [Qemu-devel] [PATCH for-2.12 v3 00/11] spapr: introduce an IRQ allocator at the machine level Cédric Le Goater
2017-11-10 15:20 ` [Qemu-devel] [PATCH for-2.12 v3 01/11] spapr: add pseries 2.12 machine type Cédric Le Goater
2017-11-11 15:15   ` Greg Kurz
2017-11-13  5:51   ` David Gibson
2017-11-13  9:50     ` Greg Kurz
2017-11-14  9:08       ` David Gibson
2017-11-13  7:14   ` [Qemu-devel] QEMU 3.0 ? (was: [PATCH for-2.12 v3 01/11] spapr: add pseries 2.12 machine type) Thomas Huth
2017-11-13  9:53     ` Peter Maydell
2017-11-13 10:03       ` [Qemu-devel] QEMU 3.0 ? Cédric Le Goater
2017-11-13 10:21         ` Peter Maydell
2017-11-13 10:25       ` Thomas Huth
2017-11-23 10:03     ` [Qemu-devel] QEMU 3.0 ? (was: [PATCH for-2.12 v3 01/11] spapr: add pseries 2.12 machine type) Cornelia Huck
2017-11-23 10:17       ` Peter Maydell
2017-11-23 10:57         ` [Qemu-devel] QEMU 3.0 ? Thomas Huth
2017-11-23 11:11           ` Daniel P. Berrange
2017-11-23 11:24             ` Thomas Huth
2017-11-23 11:33               ` Daniel P. Berrange
2017-11-23 11:40                 ` Thomas Huth
2017-11-23 11:17           ` Paolo Bonzini
2017-11-23 11:57             ` Thomas Huth
2017-11-23 12:05               ` Paolo Bonzini
2017-11-23 12:09                 ` Cornelia Huck
2017-11-23 12:26                   ` Paolo Bonzini
2017-11-23 12:39                     ` Cornelia Huck
2017-11-23 12:59                       ` Daniel P. Berrange
2017-11-23 13:08                         ` Paolo Bonzini
2017-11-23 13:23                           ` Daniel P. Berrange
2017-11-23 13:25                             ` Paolo Bonzini
2017-11-23 13:02                       ` Paolo Bonzini
2017-11-23 13:13                         ` Cornelia Huck
2017-11-23 13:27                           ` Paolo Bonzini
2017-11-23 13:13                         ` Peter Maydell
2017-11-23 13:51                           ` Paolo Bonzini
2017-11-23 13:57                             ` Peter Maydell
2017-11-23 14:01                               ` Thomas Huth
2017-11-23 14:13                                 ` Paolo Bonzini
2017-11-23 13:57                             ` Daniel P. Berrange
2017-11-23 14:57             ` Igor Mammedov
2017-11-23 11:14         ` [Qemu-devel] QEMU 3.0 ? (was: [PATCH for-2.12 v3 01/11] spapr: add pseries 2.12 machine type) Daniel P. Berrange
2017-11-23 11:26           ` [Qemu-devel] QEMU 3.0 ? Thomas Huth
2017-11-10 15:20 ` [Qemu-devel] [PATCH for-2.12 v3 02/11] ppc/xics: remove useless if condition Cédric Le Goater
2017-11-11 14:50   ` Greg Kurz
2017-11-13  5:28   ` David Gibson
2017-11-10 15:20 ` [Qemu-devel] [PATCH for-2.12 v3 03/11] spapr: introduce new XICSFabric operations for an IRQ allocator Cédric Le Goater
2017-11-14  8:52   ` Greg Kurz
2017-11-17  4:48   ` David Gibson
2017-11-17  7:16     ` Cédric Le Goater
2017-11-23 11:07       ` David Gibson
2017-11-23 13:22         ` Cédric Le Goater
2017-11-10 15:20 ` [Qemu-devel] [PATCH for-2.12 v3 04/11] spapr: move current IRQ allocation under the machine Cédric Le Goater
2017-11-14  8:56   ` Greg Kurz
2017-11-10 15:20 ` [Qemu-devel] [PATCH for-2.12 v3 05/11] spapr: introduce an IRQ allocator using a bitmap Cédric Le Goater
2017-11-14  9:42   ` Greg Kurz
2017-11-14 11:54     ` Cédric Le Goater
2017-11-14 15:28       ` Greg Kurz
2017-11-15  8:47         ` Cédric Le Goater
2017-11-17  4:50     ` David Gibson
2017-11-17  7:19       ` Cédric Le Goater
2017-11-23 11:08         ` David Gibson
2017-11-20 12:07       ` Greg Kurz
2017-11-23 11:13         ` David Gibson
2017-11-10 15:20 ` [Qemu-devel] [PATCH for-2.12 v3 06/11] spapr: store a reference IRQ bitmap Cédric Le Goater
2017-11-14 15:12   ` Greg Kurz
2017-11-10 15:20 ` [Qemu-devel] [PATCH for-2.12 v3 07/11] spapr: introduce an 'irq_base' number Cédric Le Goater
2017-11-14 15:45   ` Greg Kurz
2017-11-15 15:24     ` Cédric Le Goater
2017-11-15 16:43       ` Greg Kurz
2017-11-10 15:20 ` [Qemu-devel] [PATCH for-2.12 v3 08/11] spapr: introduce a XICSFabric irq_is_lsi() operation Cédric Le Goater
2017-11-14 16:21   ` Greg Kurz
2017-11-17  4:54   ` David Gibson
2017-11-17  7:23     ` Cédric Le Goater
2017-11-23 11:12       ` David Gibson
2017-11-23 13:26         ` Cédric Le Goater
2017-11-10 15:20 ` [Qemu-devel] [PATCH for-2.12 v3 09/11] spapr: split the IRQ number space for LSI interrupts Cédric Le Goater
2017-11-15 15:52   ` Greg Kurz
2017-11-15 16:08     ` Cédric Le Goater
2017-11-15 20:27       ` Greg Kurz
2017-11-10 15:20 ` [Qemu-devel] [PATCH for-2.12 v3 10/11] sparp: merge ics_set_irq_type() in irq_alloc_block() operation Cédric Le Goater
2017-11-10 15:20 ` [Qemu-devel] [PATCH for-2.12 v3 11/11] spapr: use sPAPRMachineState in spapr_ics_ prototypes Cédric Le Goater

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.