qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/3] spapr: introduce a fixed IRQ number space
@ 2018-06-18 17:33 Cédric Le Goater
  2018-06-18 17:34 ` [Qemu-devel] [PATCH v2 1/3] spapr: split the IRQ allocation sequence Cédric Le Goater
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Cédric Le Goater @ 2018-06-18 17:33 UTC (permalink / raw)
  To: qemu-ppc; +Cc: qemu-devel, David Gibson, Cédric Le Goater

Here is a proposal for a new IRQ number space layout using static
numbers and a bitmap allocator for the MSIs. The previous layout is
kept for compatibly in machines raising the 'xics_legacy' flag.

These are just the basics preparing ground for the new XIVE
controller. I would also like to introduce a structure like below to
abstract the IRQ controller in the sPAPR machine :
  
  typedef struct sPAPRIrq {
      uint32_t    nr_irqs;
      uint8_t     ov5;
  
      void (*init)(sPAPRMachineState *spapr, uint32_t nr_servers, Error **errp);
      int (*claim)(sPAPRMachineState *spapr, uint32_t irq, bool lsi, Error **errp);
      void (*free)(sPAPRMachineState *spapr, int irq, int num, Error **errp);
      qemu_irq (*qirq)(sPAPRMachineState *spapr, int irq);
      void (*print_info)(sPAPRMachineState *spapr, Monitor *mon);
      void (*dt_populate)(sPAPRMachineState *spapr, uint32_t nr_servers,
                          void *fdt, uint32_t phandle);
      Object *(*cpu_intc_create)(sPAPRMachineState *spapr, Object *cpu,
                                 Error **errp);
      void (*post_load)(sPAPRMachineState *spapr);
  } sPAPRIrq;

Thanks,

C.

Changes since v1 :

 - removed block allocation
 - spaced the IRQ offsets 
 - check for overlaps when allocating VIO irqs
 - removed 'Error *' arg from spapr_irq_msi_init() 

Cédric Le Goater (3):
  spapr: split the IRQ allocation sequence
  spapr: remove unused spapr_irq routines
  spapr: introduce a fixed IRQ number space

 include/hw/ppc/spapr.h     |  12 ++++--
 include/hw/ppc/spapr_irq.h |  30 ++++++++++++++
 hw/ppc/spapr.c             | 101 +++++++++++++++++++++++----------------------
 hw/ppc/spapr_events.c      |  26 ++++++++++--
 hw/ppc/spapr_irq.c         |  56 +++++++++++++++++++++++++
 hw/ppc/spapr_pci.c         |  39 +++++++++++++++--
 hw/ppc/spapr_vio.c         |  21 +++++++++-
 hw/ppc/Makefile.objs       |   2 +-
 8 files changed, 225 insertions(+), 62 deletions(-)
 create mode 100644 include/hw/ppc/spapr_irq.h
 create mode 100644 hw/ppc/spapr_irq.c

-- 
2.13.6

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

end of thread, other threads:[~2018-06-20  5:17 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-18 17:33 [Qemu-devel] [PATCH v2 0/3] spapr: introduce a fixed IRQ number space Cédric Le Goater
2018-06-18 17:34 ` [Qemu-devel] [PATCH v2 1/3] spapr: split the IRQ allocation sequence Cédric Le Goater
2018-06-19  0:38   ` David Gibson
2018-06-18 17:34 ` [Qemu-devel] [PATCH v2 2/3] spapr: remove unused spapr_irq routines Cédric Le Goater
2018-06-19  0:39   ` David Gibson
2018-06-18 17:34 ` [Qemu-devel] [PATCH v2 3/3] spapr: introduce a fixed IRQ number space Cédric Le Goater
2018-06-19  1:02   ` David Gibson
2018-06-19  5:00     ` Cédric Le Goater
2018-06-20  0:17       ` David Gibson
2018-06-19 10:05     ` Cédric Le Goater
2018-06-20  0:19       ` David Gibson
2018-06-20  5:16     ` 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).