Accessing the machine state using the global qdev_get_machine() function isn't generally recommended. In a bunch of places in the sPAPR code, the machine state can be obtained from the caller actually.
Greg Kurz (6): spapr: Add an "spapr" property to sPAPR CPU core spapr: Add an "spapr" property to sPAPR PHB spapr: Pass sPAPR machine state down to spapr_pci_switch_vga() spapr: Don't use qdev_get_machine() in spapr_msi_write() spapr: Pass sPAPR machine state to some RTAS events handling functions target/ppc: Add mce_req_event() handler to PPCVirtualHypervisorClass include/hw/pci-host/spapr.h | 1 + include/hw/ppc/spapr.h | 5 +++-- include/hw/ppc/spapr_cpu_core.h | 2 ++ target/ppc/cpu.h | 2 ++ hw/ppc/spapr.c | 9 +++++++++ hw/ppc/spapr_cpu_core.c | 17 +++++++---------- hw/ppc/spapr_events.c | 26 +++++++++++++------------- hw/ppc/spapr_hcall.c | 7 ++++--- hw/ppc/spapr_pci.c | 22 +++++++++------------- hw/ppc/spapr_pci_nvlink2.c | 2 +- target/ppc/kvm.c | 9 +++++++-- 11 files changed, 58 insertions(+), 44 deletions(-) -- 2.26.2