Skip to content

hw/ppc: Set QDev properties using QDev API (part 2/3)

Philippe Mathieu-Daudé qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5hw/misc/macio: Set QDev properties using QDev APIhw/misc/macio/macio.c+2 -40 replies
2/5hw/pci-host/raven: Set QDev properties using QDev APIhw/pci-host/raven.c+2 -41 reply
3/5hw/ppc/ppc4xx: Set QDev properties using QDev APIhw/ppc/e500.c hw/ppc/ppc405_boards.c hw/ppc/ppc405_uc.c +3 more+10 -152 replies
4/5hw/ppc/spapr: Set QDev properties using QDev APIhw/intc/spapr_xive.c hw/intc/xics.c hw/intc/xive.c +1 more+11 -162 replies
5/5hw/ppc/pnv: Set QDev properties using QDev APIhw/intc/pnv_xive.c hw/intc/pnv_xive2.c hw/pci-host/pnv_phb3.c +4 more+37 -632 replies

Reviews trailers per patch

4 of 5 patches have a Reviewed-by or Acked-by.

PatchBALATON ZoltanDaniel Henrique BarbozaCédric Le Goater
1/5
2/5R-b
3/5R-b R-b
4/5R-b R-b
5/5R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/5] hw/ppc: Set QDev properties using QDev API (part 2/3)

part 1 [*] cover:
--
QEMU provides the QOM API for core objects. Devices are modelled on top of QOM as QDev objects.

There is no point in using the lower level QOM API with QDev; it makes the code more complex and harder to review.

I first converted all the calls using errp=&error_abort or &errp=NULL, then noticed the other uses weren't really consistent.

A QDev property defined with the DEFINE_PROP_xxx() macros is always available, thus can't fail. When using hot-plug devices, we only need to check for optional properties registered at runtime with the object_property_add_XXX() API. Some are even always registered in device instance_init. --

In this series PPC hw is converted. Only one call site in PNV forwards the Error* argument and its conversion is justified.

Based-on: <[email protected]>
(in particular [PATCH 02/19] hw/qdev: Introduce qdev_prop_set_link():
https://lore.kernel.org/qemu-devel/[email protected]/)

[*] https://lore.kernel.org/qemu-devel/[email protected]/

Philippe Mathieu-Daudé (5):
hw/misc/macio: Set QDev properties using QDev API hw/pci-host/raven: Set QDev properties using QDev API hw/ppc/ppc4xx: Set QDev properties using QDev API hw/ppc/spapr: Set QDev properties using QDev API hw/ppc/pnv: Set QDev properties using QDev API

 hw/intc/pnv_xive.c         | 11 ++++------
 hw/intc/pnv_xive2.c        | 15 +++++---------
 hw/intc/spapr_xive.c       | 11 ++++------
 hw/intc/xics.c             |  4 ++--
 hw/intc/xive.c             |  4 ++--
 hw/misc/macio/macio.c      |  6 ++----
 hw/pci-host/pnv_phb3.c     |  9 +++------
 hw/pci-host/pnv_phb4.c     |  4 ++--
 hw/pci-host/pnv_phb4_pec.c | 10 +++-------
 hw/pci-host/raven.c        |  6 ++----
 hw/ppc/e500.c              |  3 +--
 hw/ppc/pnv.c               | 41 ++++++++++++++++----------------------
 hw/ppc/pnv_psi.c           | 10 +++-------
 hw/ppc/ppc405_boards.c     |  6 ++----
 hw/ppc/ppc405_uc.c         |  6 +++---
 hw/ppc/ppc440_bamboo.c     |  3 +--
 hw/ppc/ppc4xx_devs.c       |  2 +-
 hw/ppc/sam460ex.c          |  5 ++---
 hw/ppc/spapr_irq.c         |  8 +++-----
 19 files changed, 62 insertions(+), 102 deletions(-)
Signature · 1 line
2.38.1