[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 24/50] multi-process: add processing of remote device command
From: |
Jagannathan Raman |
Subject: |
[PATCH v5 24/50] multi-process: add processing of remote device command line |
Date: |
Mon, 24 Feb 2020 15:55:15 -0500 |
From: Elena Ufimtseva <address@hidden>
Add processing of command line options for devices emulated
in the remote process.
After remote devices are created along with their proxies,
signal the proxies to finish the configuration steps.
Signed-off-by: John G Johnson <address@hidden>
Signed-off-by: Jagannathan Raman <address@hidden>
Signed-off-by: Elena Ufimtseva <address@hidden>
---
softmmu/vl.c | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/softmmu/vl.c b/softmmu/vl.c
index 94a7b93..79a286c 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -35,6 +35,11 @@
#include "sysemu/runstate.h"
#include "sysemu/seccomp.h"
#include "sysemu/tcg.h"
+#include "qapi/qmp/qdict.h"
+#include "block/qdict.h"
+#include "qapi/qmp/qstring.h"
+#include "qapi/qmp/qjson.h"
+#include "qapi/qmp/qlist.h"
#include "qemu/error-report.h"
#include "qemu/sockets.h"
@@ -2065,10 +2070,35 @@ static int device_help_func(void *opaque, QemuOpts
*opts, Error **errp)
return qdev_device_help(opts);
}
+#if defined(CONFIG_MPQEMU)
+static int rdevice_init_func(void *opaque, QemuOpts *opts, Error **errp)
+{
+ DeviceState *dev;
+
+ dev = qdev_remote_add(opts, errp);
+ if (!dev) {
+ error_setg(errp, "qdev_remote_add failed for device.");
+ return -1;
+ }
+ object_unref(OBJECT(dev));
+ return 0;
+}
+#endif
+
static int device_init_func(void *opaque, QemuOpts *opts, Error **errp)
{
DeviceState *dev;
+#if defined(CONFIG_MPQEMU)
+ const char *remote;
+
+ remote = qemu_opt_get(opts, "remote");
+ if (remote) {
+ /* This will be a remote process */
+ return rdevice_init_func(opaque, opts, errp);
+ }
+#endif
+
dev = qdev_device_add(opts, errp);
if (!dev && *errp) {
error_report_err(*errp);
@@ -4307,6 +4337,9 @@ void qemu_init(int argc, char **argv, char **envp)
qemu_register_reset(resettable_cold_reset_fn, sysbus_get_default());
qemu_run_machine_init_done_notifiers();
+#if defined(CONFIG_MPQEMU)
+ qdev_proxy_fire();
+#endif
if (rom_check_and_register_reset() != 0) {
error_report("rom check and register reset failed");
exit(1);
--
1.8.3.1
- [PATCH v5 13/50] multi-process: introduce proxy object, (continued)
- [PATCH v5 13/50] multi-process: introduce proxy object, Jagannathan Raman, 2020/02/24
- [PATCH v5 15/50] multi-process: PCI BAR read/write handling for proxy & remote endpoints, Jagannathan Raman, 2020/02/24
- [PATCH v5 16/50] multi-process: Synchronize remote memory, Jagannathan Raman, 2020/02/24
- [PATCH v5 18/50] multi-process: configure remote side devices, Jagannathan Raman, 2020/02/24
- [PATCH v5 17/50] multi-process: create IOHUB object to handle irq, Jagannathan Raman, 2020/02/24
- [PATCH v5 20/50] multi-process: add qdev_proxy_add to create proxy devices, Jagannathan Raman, 2020/02/24
- [PATCH v5 19/50] multi-process: Retrieve PCI info from remote process, Jagannathan Raman, 2020/02/24
- [PATCH v5 21/50] multi-process: remote: add setup_devices msg processing, Jagannathan Raman, 2020/02/24
- [PATCH v5 23/50] multi-process: remote: add create_done condition, Jagannathan Raman, 2020/02/24
- [PATCH v5 25/50] multi-process: Introduce build flags to separate remote process code, Jagannathan Raman, 2020/02/24
- [PATCH v5 24/50] multi-process: add processing of remote device command line,
Jagannathan Raman <=
- [PATCH v5 26/50] multi-process: refractor vl.c code, Jagannathan Raman, 2020/02/24
- [PATCH v5 22/50] multi-process: remote: use fd for socket from parent process, Jagannathan Raman, 2020/02/24
- [PATCH v5 27/50] multi-process: add remote option, Jagannathan Raman, 2020/02/24
- [PATCH v5 29/50] multi-process: add parse_cmdline in remote process, Jagannathan Raman, 2020/02/24
- [PATCH v5 28/50] multi-process: add remote options parser, Jagannathan Raman, 2020/02/24
- [PATCH v5 32/50] multi-process: Use separate MMIO communication channel, Jagannathan Raman, 2020/02/24
- [PATCH v5 33/50] multi-process: perform device reset in the remote process, Jagannathan Raman, 2020/02/24
- [PATCH v5 34/50] multi-process/mon: choose HMP commands based on target, Jagannathan Raman, 2020/02/24
- [PATCH v5 35/50] multi-process/mon: stub functions to enable QMP module for remote process, Jagannathan Raman, 2020/02/24
- [PATCH v5 30/50] multi-process: send heartbeat messages to remote, Jagannathan Raman, 2020/02/24