qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 0/8] introduce an IRQ allocator at the machine level


From: Cédric Le Goater
Subject: [Qemu-devel] [PATCH 0/8] introduce an IRQ allocator at the machine level
Date: Sun, 29 Oct 2017 19:12:09 +0100

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]