[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 01/10] qdev: Expose qemu_create_machine()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v3 01/10] qdev: Expose qemu_create_machine() |
Date: |
Thu, 2 Jan 2025 16:12:35 +0100 |
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
- [PATCH v3 00/10] QOM: container_get() removal, Philippe Mathieu-Daudé, 2025/01/02
- [PATCH v3 01/10] qdev: Expose qemu_create_machine(),
Philippe Mathieu-Daudé <=
- [PATCH v3 03/10] qdev: Call qemu_create_machine() on user emulation, Philippe Mathieu-Daudé, 2025/01/02
- [PATCH v3 02/10] qdev: Implement qemu_create_machine() for user emulation, Philippe Mathieu-Daudé, 2025/01/02
- [PATCH v3 07/10] qom: Add object_get_container(), Philippe Mathieu-Daudé, 2025/01/02
- [PATCH v3 04/10] qdev: Make qdev_get_machine() not use container_get(), Philippe Mathieu-Daudé, 2025/01/02
- [PATCH v3 05/10] qdev: Add machine_get_container(), Philippe Mathieu-Daudé, 2025/01/02
- [PATCH v3 06/10] qdev: Use machine_get_container(), Philippe Mathieu-Daudé, 2025/01/02
- [PATCH v3 08/10] qom: Use object_get_container(), Philippe Mathieu-Daudé, 2025/01/02
- [PATCH v3 09/10] qom: Remove container_get(), Philippe Mathieu-Daudé, 2025/01/02
- [PATCH v3 10/10] qdev: Inline machine_containers[] in qemu_create_machine_containers(), Philippe Mathieu-Daudé, 2025/01/02