qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v3 03/10] qdev: Call qemu_create_machine() on user emulation


From: Philippe Mathieu-Daudé
Subject: [PATCH v3 03/10] qdev: Call qemu_create_machine() on user emulation
Date: Thu, 2 Jan 2025 16:12:37 +0100

For system emulation, qemu_create_machine() is
called from qemu_init().
TCG accelerator always calls tcg_init_machine().
Use it to call qemu_create_machine() on user
emulation.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 accel/tcg/tcg-all.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c
index c2565758876..e18b0c03f71 100644
--- a/accel/tcg/tcg-all.c
+++ b/accel/tcg/tcg-all.c
@@ -35,7 +35,9 @@
 #include "qemu/atomic.h"
 #include "qapi/qapi-builtin-visit.h"
 #include "qemu/units.h"
-#if !defined(CONFIG_USER_ONLY)
+#if defined(CONFIG_USER_ONLY)
+#include "hw/qdev-core.h"
+#else
 #include "hw/boards.h"
 #endif
 #include "internal-common.h"
@@ -124,6 +126,10 @@ static int tcg_init_machine(MachineState *ms)
     tcg_prologue_init();
 #endif
 
+#ifdef CONFIG_USER_ONLY
+    qemu_create_machine(NULL);
+#endif
+
     return 0;
 }
 
-- 
2.47.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]