This allows to hotplug/unplug PHBs. I could successfully test: - using in-kernel XICS, emulated XICS and XIVE - hotplug/unplug with e1000 device to validate LSIs - hotplug/unplug with virtio-net device to validate MSIs - some simple migration scenarios
Based on David's ppc-for-4.0 branch SHA1: 6f585625d0d1 target/ppc: Basic POWER9 bare-metal radix MMU support Please comment. Changes in v5: - all DRC subtypes generate FDT fragment at configure connector time - Drop all the LSI bitmap and allocation/typing disintricate stuff - set IRQ type in KVM at claim time - fix hotplug call chain - added PHB unplug test to tests/device-plug-test Changes in v4: - added a LSI bitmap to XICS - no longer need compat property in XICS - simplified the patches to access the name and the phandle of the interrupt controller - delay the creation of the PHB drc->fdt to RTAS ibm,configure-connector Change in v3: - reworked phandle related code some more - disintricate allocation/"type setting" of interrupts - identify LSIs at machine init Changes in v2: - rebased on current ppc-for-4.0 - added some preliminary cleanup - call unrealize from realize error path - advertise PHB hotplug in last patch - reworked phandle related code - sync LSIs to KVM -- Greg --- Greg Kurz (11): spapr_drc: Allow FDT fragment to be added later spapr: Generate FDT fragment for LMBs at configure connector time spapr: Generate FDT fragment for CPUs at configure connector time spapr/pci: Generate FDT fragment at configure connector time spapr/drc: Drop spapr_drc_attach() fdt argument xics: Write source state to KVM at claim time spapr: Expose the name of the interrupt controller node spapr_irq: Expose the phandle of the interrupt controller spapr_pci: add PHB unrealize spapr: add hotplug hooks for PHB hotplug tests/device-plug: Add PHB unplug request test for spapr Michael Roth (5): spapr: create DR connectors for PHBs spapr_events: add support for phb hotplug events spapr_pci: provide node start offset via spapr_populate_pci_dt() spapr_pci: add ibm, my-drc-index property for PHB hotplug spapr: enable PHB hotplug for default pseries machine type Nathan Fontenot (1): spapr: populate PHB DRC entries for root DT node hw/intc/spapr_xive.c | 9 +- hw/intc/xics.c | 4 + hw/intc/xics_kvm.c | 74 ++++++++----- hw/intc/xics_spapr.c | 2 hw/ppc/spapr.c | 238 +++++++++++++++++++++++++++++++++++-------- hw/ppc/spapr_drc.c | 51 ++++++++- hw/ppc/spapr_events.c | 3 + hw/ppc/spapr_irq.c | 42 +++++++- hw/ppc/spapr_pci.c | 135 ++++++++++++++++++++---- include/hw/pci-host/spapr.h | 11 ++ include/hw/ppc/spapr.h | 10 ++ include/hw/ppc/spapr_drc.h | 17 +++ include/hw/ppc/spapr_irq.h | 2 include/hw/ppc/spapr_xive.h | 3 + include/hw/ppc/xics.h | 1 include/hw/ppc/xics_spapr.h | 2 tests/device-plug-test.c | 16 +++ 17 files changed, 497 insertions(+), 123 deletions(-)