Hello, The PowerNV and sPAPR machine use qdev_get_machine() and get_system_memory() in some places. This is not a good modeling pratice and it should be avoided. This series replaces the uses of these routines with a set of QOM properties and aliases.
Thanks, C. Changes since v1: - fixed a missing assert(chip->system_memory) - introduced a XivePresenter link under XiveTCTX Cédric Le Goater (5): ppc/pnv: Modify the powerdown notifier to get the PowerNV machine ppc/pnv: Introduce a "system-memory" property ppc/pnv: Introduce a "xics" property alias under the PSI model ppc/pnv: Introduce a "xics" property under the POWER8 chip xive: Add a "presenter" link property to the TCTX object Greg Kurz (8): spapr/xive: Use device_class_set_parent_realize() pnv/xive: Use device_class_set_parent_realize() spapr, pnv, xive: Add a "xive-fabric" link to the XIVE router xive: Use the XIVE fabric link under the XIVE router ppc/pnv: Add an "nr-threads" property to the base chip class ppc/pnv: Add a "pnor" const link property to the BMC internal simulator spapr/xive: Deduce the SpaprXive pointer from XiveTCTX::xptr pnv/xive: Deduce the PnvXive pointer from XiveTCTX::xptr include/hw/ppc/pnv.h | 9 ++-- include/hw/ppc/pnv_psi.h | 1 + include/hw/ppc/pnv_xive.h | 12 +++++ include/hw/ppc/spapr_xive.h | 10 ++++ include/hw/ppc/xive.h | 13 +++-- hw/intc/pnv_xive.c | 23 ++++++--- hw/intc/spapr_xive.c | 14 +++++- hw/intc/spapr_xive_kvm.c | 9 ++-- hw/intc/xive.c | 28 +++++++++-- hw/ppc/pnv.c | 94 ++++++++++++++++++++++++------------- hw/ppc/pnv_bmc.c | 8 ++-- hw/ppc/pnv_psi.c | 22 ++++----- hw/ppc/spapr_irq.c | 2 + 13 files changed, 172 insertions(+), 73 deletions(-) -- 2.21.0