mbox series

[v4,0/8] QOM: container_get() removal

Message ID 20250102211800.79235-1-philmd@linaro.org
Headers show
Series QOM: container_get() removal | expand

Message

Philippe Mathieu-Daudé Jan. 2, 2025, 9:17 p.m. UTC
Respin of Peter's v2:
https://lore.kernel.org/qemu-devel/20241121192202.4155849-1-peterx@redhat.com/

'The series is about container_get() and its removal.'
(See v2's cover).

Since v3:
- Implement qdev_create_fake_machine() in single patch (peterx)

Since v2:
- Create fake machine container for user emulation to avoid:

  $ ./qemu-x86_64 /bin/echo foo
  qemu-x86_64: ../../hw/core/qdev.c:825: qdev_get_machine: Assertion `dev' failed.
  Aborted (core dumped)

Peter Xu (6):
  qdev: Make qdev_get_machine() not use container_get()
  qdev: Add machine_get_container()
  qdev: Use machine_get_container()
  qom: Add object_get_container()
  qom: Use object_get_container()
  qom: Remove container_get()

Philippe Mathieu-Daudé (2):
  qdev: Implement qdev_create_fake_machine() for user emulation
  system: Inline machine_containers[] in
    qemu_create_machine_containers()

 include/hw/qdev-core.h | 20 ++++++++++++++++++++
 include/qom/object.h   | 21 ++++++++++-----------
 accel/tcg/tcg-all.c    |  8 +++++++-
 backends/cryptodev.c   |  4 ++--
 chardev/char.c         |  2 +-
 hw/core/gpio.c         |  3 +--
 hw/core/qdev-user.c    | 21 +++++++++++++++++++++
 hw/core/qdev.c         | 21 ++++++++++++++++++---
 hw/core/sysbus.c       |  4 ++--
 hw/i386/pc.c           |  4 ++--
 qom/container.c        | 23 -----------------------
 qom/object.c           | 12 +++++++++++-
 scsi/pr-manager.c      |  4 ++--
 system/ioport.c        |  2 +-
 system/memory.c        |  2 +-
 system/qdev-monitor.c  |  6 +++---
 system/vl.c            | 19 ++++++++-----------
 ui/console.c           |  2 +-
 ui/dbus-chardev.c      |  2 +-
 hw/core/meson.build    |  1 +
 20 files changed, 113 insertions(+), 68 deletions(-)
 create mode 100644 hw/core/qdev-user.c