[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
- [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é, 2025/01/02
- [PATCH v3 03/10] qdev: Call qemu_create_machine() on user emulation,
Philippe Mathieu-Daudé <=
- [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
- Re: [PATCH v3 00/10] QOM: container_get() removal, Peter Xu, 2025/01/02