All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Eduardo Habkost" <eduardo@habkost.net>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	qemu-block@nongnu.org,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"David Hildenbrand" <david@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Zhenwei Pi" <pizhenwei@bytedance.com>,
	"Fam Zheng" <fam@euphon.net>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Peter Xu" <peterx@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Gonglei (Arei)" <arei.gonglei@huawei.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH v3 01/10] qdev: Expose qemu_create_machine()
Date: Thu,  2 Jan 2025 16:12:35 +0100	[thread overview]
Message-ID: <20250102151244.59357-2-philmd@linaro.org> (raw)
In-Reply-To: <20250102151244.59357-1-philmd@linaro.org>

We need to create a 'fake' machine container for the
QOM API. We already have the system implementation
for qemu_create_machine(). Expose its prototype to
be able to add the user implementation.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 include/hw/qdev-core.h | 2 ++
 system/vl.c            | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
index e6ef80b7fd0..bf8a0ee6486 100644
--- a/include/hw/qdev-core.h
+++ b/include/hw/qdev-core.h
@@ -1106,6 +1106,8 @@ void device_listener_unregister(DeviceListener *listener);
  */
 bool qdev_should_hide_device(const QDict *opts, bool from_json, Error **errp);
 
+void qemu_create_machine(QDict *qdict);
+
 typedef enum MachineInitPhase {
     /* current_machine is NULL.  */
     PHASE_NO_MACHINE,
diff --git a/system/vl.c b/system/vl.c
index 0843b7ab49b..33fbb9f32f3 100644
--- a/system/vl.c
+++ b/system/vl.c
@@ -28,6 +28,7 @@
 #include "qemu/units.h"
 #include "exec/cpu-common.h"
 #include "exec/page-vary.h"
+#include "hw/qdev-core.h"
 #include "hw/qdev-properties.h"
 #include "qapi/compat-policy.h"
 #include "qapi/error.h"
@@ -2128,7 +2129,7 @@ static void qemu_create_machine_containers(Object *machine)
     }
 }
 
-static void qemu_create_machine(QDict *qdict)
+void qemu_create_machine(QDict *qdict)
 {
     MachineClass *machine_class = select_machine(qdict, &error_fatal);
     object_set_machine_compat_props(machine_class->compat_props);
-- 
2.47.1



  reply	other threads:[~2025-01-02 15:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-02 15:12 [PATCH v3 00/10] QOM: container_get() removal Philippe Mathieu-Daudé
2025-01-02 15:12 ` Philippe Mathieu-Daudé [this message]
2025-01-02 15:12 ` [PATCH v3 02/10] qdev: Implement qemu_create_machine() for user emulation Philippe Mathieu-Daudé
2025-01-02 15:17   ` Philippe Mathieu-Daudé
2025-01-02 15:12 ` [PATCH v3 03/10] qdev: Call qemu_create_machine() on " Philippe Mathieu-Daudé
2025-01-02 15:12 ` [PATCH v3 04/10] qdev: Make qdev_get_machine() not use container_get() Philippe Mathieu-Daudé
2025-01-02 15:12 ` [PATCH v3 05/10] qdev: Add machine_get_container() Philippe Mathieu-Daudé
2025-01-02 15:12 ` [PATCH v3 06/10] qdev: Use machine_get_container() Philippe Mathieu-Daudé
2025-01-02 15:12 ` [PATCH v3 07/10] qom: Add object_get_container() Philippe Mathieu-Daudé
2025-01-02 15:12 ` [PATCH v3 08/10] qom: Use object_get_container() Philippe Mathieu-Daudé
2025-01-02 15:12 ` [PATCH v3 09/10] qom: Remove container_get() Philippe Mathieu-Daudé
2025-01-02 15:12 ` [PATCH v3 10/10] qdev: Inline machine_containers[] in qemu_create_machine_containers() Philippe Mathieu-Daudé
2025-01-02 17:29 ` [PATCH v3 00/10] QOM: container_get() removal Peter Xu
2025-01-02 21:14   ` Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250102151244.59357-2-philmd@linaro.org \
    --to=philmd@linaro.org \
    --cc=arei.gonglei@huawei.com \
    --cc=berrange@redhat.com \
    --cc=david@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=fam@euphon.net \
    --cc=marcandre.lureau@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=pizhenwei@bytedance.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.