From: "Cédric Le Goater" <clg@kaod.org>
To: qemu-ppc@nongnu.org
Cc: qemu-devel@nongnu.org,
"David Gibson" <david@gibson.dropbear.id.au>,
"Greg Kurz" <groug@kaod.org>,
"Alexey Kardashevskiy" <aik@ozlabs.ru>,
"Cédric Le Goater" <clg@kaod.org>
Subject: [Qemu-devel] [PATCH 0/4] spapr: generic IRQ frontend
Date: Fri, 18 May 2018 18:44:01 +0200 [thread overview]
Message-ID: <20180518164405.11804-1-clg@kaod.org> (raw)
Hello,
This proposal moves all the related IRQ routines of the sPAPR machine
behind a class interface to prepare for future changes in the IRQ
controller model. First of which is a reorganization of the IRQ number
space layout and a second, coming later, will be to integrate the
support for the new POWER9 XIVE IRQ controller.
The new interface defines a set of fixed IRQ number ranges, for each
IRQ type, in which devices allocate the IRQ numbers they need
depending on a unique device index. Here is the layout :
RANGES DEVICES
0x0000 - 0x0FFF Reserved for future use (IPI = 2)
0x1000 - 0x1000 1 EPOW
0x1001 - 0x1001 1 HOTPLUG
0x1002 - 0x10FF unused
0x1100 - 0x11FF 256 VIO devices (1 IRQ each)
0x1200 - 0x1283 32 PCI LSI devices (4 IRQs each)
0x1284 - 0x13FF unused
0x1400 - 0x17FF PCI MSI device 1 (1024 IRQs each)
0x1800 - 0x1BFF PCI MSI device 1
0x1c00 - 0x1FFF PCI MSI device 2
0x2000 .... not allocated. Need to increase NR_IRQS
Each device model is modified to take the new interface into account
using the IRQ range/type definitions and a device index. A part from
the VIO devices, lacking an id, the changes are relatively simple.
The MSI range is a bit more complex to handle as the IRQS are dynamically
allocated by the guest OS. In consequence, we use a bitmap allocator
under the machine for these.
The XICS IRQ number space is increased to 4K, which gives three MSI
ranges of 1K for the PHBs. The XICS source IRQ numbers still have the
4K offset.
Thanks,
C.
Cédric Le Goater (4):
spapr: remove irq_hint parameter from spapr_irq_alloc()
sparp_pci: simplify how the PCI LSIs are allocated
spapr: introduce a generic IRQ frontend to the machine
spapr: introduce a new IRQ backend using fixed IRQ number ranges
include/hw/ppc/spapr.h | 13 +-
include/hw/ppc/spapr_irq.h | 58 ++++++
hw/ppc/spapr.c | 208 +++------------------
hw/ppc/spapr_events.c | 8 +-
hw/ppc/spapr_irq.c | 451 +++++++++++++++++++++++++++++++++++++++++++++
hw/ppc/spapr_pci.c | 40 ++--
hw/ppc/spapr_vio.c | 5 +-
hw/ppc/Makefile.objs | 2 +-
8 files changed, 571 insertions(+), 214 deletions(-)
create mode 100644 include/hw/ppc/spapr_irq.h
create mode 100644 hw/ppc/spapr_irq.c
--
2.13.6
next reply other threads:[~2018-05-18 16:44 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-18 16:44 Cédric Le Goater [this message]
2018-05-18 16:44 ` [Qemu-devel] [PATCH 1/4] spapr: remove irq_hint parameter from spapr_irq_alloc() Cédric Le Goater
2018-05-25 14:02 ` Greg Kurz
2018-05-28 6:17 ` Thomas Huth
2018-05-28 7:06 ` Cédric Le Goater
2018-05-28 7:18 ` [Qemu-devel] [Qemu-ppc] " Thomas Huth
2018-05-28 9:20 ` Cédric Le Goater
2018-05-28 12:09 ` Greg Kurz
2018-05-28 13:33 ` Cédric Le Goater
2018-06-05 3:34 ` [Qemu-devel] " David Gibson
2018-06-05 6:41 ` Cédric Le Goater
2018-06-13 4:22 ` David Gibson
2018-06-13 7:24 ` Cédric Le Goater
2018-06-14 3:46 ` David Gibson
2018-06-14 13:26 ` Cédric Le Goater
2018-06-02 9:19 ` Cédric Le Goater
2018-06-04 6:05 ` Cédric Le Goater
2018-06-02 9:10 ` Cédric Le Goater
2018-05-18 16:44 ` [Qemu-devel] [PATCH 2/4] sparp_pci: simplify how the PCI LSIs are allocated Cédric Le Goater
2018-05-26 9:40 ` Greg Kurz
2018-06-05 3:44 ` David Gibson
2018-06-05 6:31 ` Cédric Le Goater
2018-06-13 4:27 ` David Gibson
2018-06-13 7:26 ` Cédric Le Goater
2018-05-18 16:44 ` [Qemu-devel] [PATCH 3/4] spapr: introduce a generic IRQ frontend to the machine Cédric Le Goater
2018-05-28 14:27 ` Greg Kurz
2018-06-13 5:00 ` David Gibson
2018-06-13 7:44 ` Cédric Le Goater
2018-05-18 16:44 ` [Qemu-devel] [PATCH 4/4] spapr: introduce a new IRQ backend using fixed IRQ number ranges Cédric Le Goater
2018-05-28 15:18 ` Greg Kurz
2018-05-28 15:42 ` Cédric Le Goater
2018-05-29 12:51 ` Cédric Le Goater
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180518164405.11804-1-clg@kaod.org \
--to=clg@kaod.org \
--cc=aik@ozlabs.ru \
--cc=david@gibson.dropbear.id.au \
--cc=groug@kaod.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).