spapr: introduce a fixed IRQ number space
commit82cffa2eb255731b8402e206d0434cc884d99e54
authorCédric Le Goater <clg@kaod.org>
Mon, 30 Jul 2018 14:11:32 +0000 (30 16:11 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Tue, 21 Aug 2018 04:28:45 +0000 (21 14:28 +1000)
tree763ef42808493580b1716ad8968162d43c6b743a
parentd45360d93d71578919ae8065a142beb941a900fd
spapr: introduce a fixed IRQ number space

This proposal introduces a new IRQ number space layout using static
numbers for all devices, depending on a device index, and a bitmap
allocator for the MSI IRQ numbers which are negotiated by the guest at
runtime.

As the VIO device model does not have a device index but a "reg"
property, we introduce a formula to compute an IRQ number from a "reg"
value. It should minimize most of the collisions.

The previous layout is kept in pre-3.1 machines raising the
'legacy_irq_allocation' machine class flag.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/Makefile.objs
hw/ppc/spapr.c
hw/ppc/spapr_events.c
hw/ppc/spapr_irq.c [new file with mode: 0644]
hw/ppc/spapr_pci.c
hw/ppc/spapr_vio.c
include/hw/ppc/spapr.h
include/hw/ppc/spapr_irq.h [new file with mode: 0644]