@@ -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,
@@ -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);
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(-)