qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/8] introduce an IRQ allocator at the machine level
@ 2017-10-29 18:12 Cédric Le Goater
  2017-10-29 18:12 ` [Qemu-devel] [PATCH 1/8] spapr: " Cédric Le Goater
                   ` (7 more replies)
  0 siblings, 8 replies; 13+ messages in thread
From: Cédric Le Goater @ 2017-10-29 18:12 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 sPAPR platform, these operations are simply backed by a
bitmap. To handle migration compatibility with older machines, we
introduce a machine class flag 'pre_2_11_has_no_bitmap'.

Below is the repo with a XIVE model using this new allocator :

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


Thanks,

C.


Cédric Le Goater (8):
  spapr: introduce an IRQ allocator at the machine level
  spapr: introduce a machine class flag to handle migration
    compatibility
  pnv: introduce an irq_test() operation
  spapr: split the IRQ number space for LSI interrupts
  spapr: introduce an is_lsi() operation
  sparp: merge ics_set_irq_type() in irq_alloc_block() operation
  spapr: move spapr_ics_free() under irq_free_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         | 135 +++++++++++++++++++++++++++++++++++++++++++++++--
 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  |  19 ++++---
 13 files changed, 227 insertions(+), 105 deletions(-)

-- 
2.13.6

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

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

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-29 18:12 [Qemu-devel] [PATCH 0/8] introduce an IRQ allocator at the machine level Cédric Le Goater
2017-10-29 18:12 ` [Qemu-devel] [PATCH 1/8] spapr: " Cédric Le Goater
2017-11-08  9:54   ` Greg Kurz
2017-11-08 16:56     ` Cédric Le Goater
2017-10-29 18:12 ` [Qemu-devel] [PATCH 2/8] spapr: introduce a machine class flag to handle migration compatibility Cédric Le Goater
2017-11-08 13:21   ` Greg Kurz
2017-11-08 16:53     ` Cédric Le Goater
2017-10-29 18:12 ` [Qemu-devel] [PATCH 3/8] pnv: introduce an irq_test() operation Cédric Le Goater
2017-10-29 18:12 ` [Qemu-devel] [PATCH 4/8] spapr: split the IRQ number space for LSI interrupts Cédric Le Goater
2017-10-29 18:12 ` [Qemu-devel] [PATCH 5/8] spapr: introduce an is_lsi() operation Cédric Le Goater
2017-10-29 18:12 ` [Qemu-devel] [PATCH 6/8] sparp: merge ics_set_irq_type() in irq_alloc_block() operation Cédric Le Goater
2017-10-29 18:12 ` [Qemu-devel] [PATCH 7/8] spapr: move spapr_ics_free() under irq_free_block() operation Cédric Le Goater
2017-10-29 18:12 ` [Qemu-devel] [PATCH 8/8] spapr: use sPAPRMachineState in spapr_ics_* prototypes Cédric Le Goater

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).