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>
Showing
- hw/ppc/Makefile.objs 1 addition, 1 deletionhw/ppc/Makefile.objs
- hw/ppc/spapr.c 32 additions, 0 deletionshw/ppc/spapr.c
- hw/ppc/spapr_events.c 8 additions, 4 deletionshw/ppc/spapr_events.c
- hw/ppc/spapr_irq.c 56 additions, 0 deletionshw/ppc/spapr_irq.c
- hw/ppc/spapr_pci.c 22 additions, 7 deletionshw/ppc/spapr_pci.c
- hw/ppc/spapr_vio.c 60 additions, 6 deletionshw/ppc/spapr_vio.c
- include/hw/ppc/spapr.h 5 additions, 0 deletionsinclude/hw/ppc/spapr.h
- include/hw/ppc/spapr_irq.h 32 additions, 0 deletionsinclude/hw/ppc/spapr_irq.h
Loading
Please register or sign in to comment