[PATCH v2 00/13] ppc/pnv: remove the use of qdev_get_machine() and get_system_memory()

Cédric Le Goater posted 13 patches 4 years, 4 months ago
Test asan failed
Test checkpatch failed
Test FreeBSD failed
Test docker-mingw@fedora failed
Test docker-clang@ubuntu failed
Test docker-quick@centos7 failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20191219181155.32530-1-clg@kaod.org
Maintainers: David Gibson <david@gibson.dropbear.id.au>, "Cédric Le Goater" <clg@kaod.org>
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(-)
[PATCH v2 00/13] ppc/pnv: remove the use of qdev_get_machine() and get_system_memory()
Posted by Cédric Le Goater 4 years, 4 months ago
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


Re: [PATCH v2 00/13] ppc/pnv: remove the use of qdev_get_machine() and get_system_memory()
Posted by David Gibson 4 years, 3 months ago
On Thu, Dec 19, 2019 at 07:11:42PM +0100, Cédric Le Goater wrote:
> 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.

Remaining patches LGTM, but will need a rebase to account for the
changes suggested in some of the earlier ones.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson