Skip to content

Clean up misuse of qdev_init() in interrupt controller creation

Markus Armbruster qemu-devel 1 version Applied

Status from this message: Thanks, applied patches 1 and 2 to ppc-next.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 9 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3PPC: Clean up misuse of qdev_init() in kvm-openpic creationhw/ppc/e500.c+11 -93 replies
2/3spapr: Clean up misuse of qdev_init() in xics-kvm creationhw/ppc/spapr.c+12 -133 replies
3/3s390x: Replace unchecked qdev_init() by qdev_init_nofail()hw/intc/s390_flic.c+1 -53 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchCornelia HuckDavid Gibson
1/3
2/3Reivewed-by
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/3] Clean up misuse of qdev_init() in interrupt controller creation

qdev_init()'s error handling has side effects: it unparents the device, and it calls qerror_report_err().

Unparenting is wanted in realize methods only when we do unusual things like trying a set of devices and keeping the first one that works. This is the case in PATCH 1+2.

qerror_report_err() is always inappropriate in realize methods, because it doesn't return the Error object. It either reports the error to stderr or the human monitor, or it stores it in the QMP monitor, where it makes the QMP command fail even though the realize method succeeded. Fortunately, none of the realize methods in this patch are reachable from QMP.

Markus Armbruster (3):
PPC: Clean up misuse of qdev_init() in kvm-openpic creation
spapr: Clean up misuse of qdev_init() in xics-kvm creation
s390x: Replace unchecked qdev_init() by qdev_init_nofail()

 hw/intc/s390_flic.c |  6 +-----
 hw/ppc/e500.c       | 20 +++++++++++---------
 hw/ppc/spapr.c      | 25 ++++++++++++-------------
 3 files changed, 24 insertions(+), 27 deletions(-)
Signature · 1 line
1.9.3