Skip to content

RFC -object/object-add support custom location and 2nd stage initialization

Igor Mammedov qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5object_add: consolidate error handlingqmp.c+6 -40 replies
2/5add optional 2nd stage initialization to -object/object-add/object_add commandsinclude/qom/object_interfaces.h qmp.c qom/Makefile.objs +2 more+107 -00 replies
3/5virtio_rng: use object_realize interface instead of calling backend APIbackends/rng.c hw/virtio/virtio-rng.c include/sysemu/rng.h+24 -190 replies
4/5vl.c: -object: handle duplicate 'id' properlyvl.c+1 -10 replies
5/5-object/object-add: use custom default object location if providedinclude/qom/object_interfaces.h qmp.c qom/object_interfaces.c +1 more+82 -42 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [RFC 0/5] -object/object-add support custom location and 2nd stage initialization

Adds optional interfaces that objects could implement if
they need to:
1. perform an additional initialization after object properties are set
2. be placed not in '/objects' container

Series depends on 2 PULL requests in flight from Andreas & Luiz with fixes for QOM interfaces and object-add monitor/QMP command. Git tree for testing:
https://github.com/imammedo/qemu/commits/extend-object-add

Igor Mammedov (5):
object_add: consolidate error handling
add optional 2nd stage initialization to
-object/object-add/object_add commands
virtio_rng: use object_realize interface instead of calling backend
API
vl.c: -object: handle duplicate 'id' properly -object/object-add: use custom default object location if provided

 backends/rng.c                  |   17 ++++++-
 hw/virtio/virtio-rng.c          |   15 ++++---
 include/qom/object_interfaces.h |   96 +++++++++++++++++++++++++++++++++++++++
 include/sysemu/rng.h            |   11 -----
 qmp.c                           |   30 +++++++++---
 qom/Makefile.objs               |    1 +
 qom/object_interfaces.c         |   57 +++++++++++++++++++++++
 vl.c                            |   21 ++++++++-
 8 files changed, 220 insertions(+), 28 deletions(-)
 create mode 100644 include/qom/object_interfaces.h
 create mode 100644 qom/object_interfaces.c