[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH RESEND v6 34/36] multi-process/mon: Initialize QMP module for rem
From: |
elena . ufimtseva |
Subject: |
[PATCH RESEND v6 34/36] multi-process/mon: Initialize QMP module for remote processes |
Date: |
Wed, 22 Apr 2020 21:14:09 -0700 |
From: Elena Ufimtseva <address@hidden>
Signed-off-by: Elena Ufimtseva <address@hidden>
Signed-off-by: John G Johnson <address@hidden>
Signed-off-by: Jagannathan Raman <address@hidden>
---
remote/remote-main.c | 13 +++++++++++++
remote/remote-opts.c | 11 +++++++++++
2 files changed, 24 insertions(+)
diff --git a/remote/remote-main.c b/remote/remote-main.c
index 562db4ccc3..199af144dd 100644
--- a/remote/remote-main.c
+++ b/remote/remote-main.c
@@ -40,6 +40,9 @@
#include "remote/iohub.h"
#include "remote-opts.h"
#include "sysemu/reset.h"
+#include "qemu-parse.h"
+#include "monitor/monitor.h"
+#include "chardev/char.h"
static void process_msg(GIOCondition cond, MPQemuLinkState *link,
MPQemuChannel *chan);
@@ -313,6 +316,8 @@ int main(int argc, char *argv[])
module_call_init(MODULE_INIT_QOM);
+ monitor_init_globals();
+
bdrv_init_with_whitelist();
if (qemu_init_main_loop(&err)) {
@@ -330,6 +335,8 @@ int main(int argc, char *argv[])
qemu_add_opts(&qemu_device_opts);
qemu_add_opts(&qemu_drive_opts);
+ qemu_add_opts(&qemu_chardev_opts);
+ qemu_add_opts(&qemu_mon_opts);
qemu_add_drive_opts(&qemu_legacy_drive_opts);
qemu_add_drive_opts(&qemu_common_drive_opts);
qemu_add_drive_opts(&qemu_drive_opts);
@@ -351,6 +358,12 @@ int main(int argc, char *argv[])
parse_cmdline(argc - 2, argv + 2, NULL);
+ qemu_opts_foreach(qemu_find_opts("chardev"),
+ chardev_init_func, NULL, &error_fatal);
+
+ qemu_opts_foreach(qemu_find_opts("mon"),
+ mon_init_func, NULL, &error_fatal);
+
mpqemu_init_channel(mpqemu_link, &mpqemu_link->com, fd);
mpqemu_link_set_callback(mpqemu_link, process_msg);
diff --git a/remote/remote-opts.c b/remote/remote-opts.c
index f077221c71..ac3a9be6b8 100644
--- a/remote/remote-opts.c
+++ b/remote/remote-opts.c
@@ -15,6 +15,7 @@
#include "qemu-options.h"
#include "qemu-parse.h"
#include "remote-opts.h"
+#include "monitor/monitor.h"
/*
* In remote process, we parse only subset of options. The code
@@ -64,6 +65,16 @@ void parse_cmdline(int argc, char **argv, char **envp)
exit(1);
}
break;
+ case QEMU_OPTION_qmp:
+ monitor_parse(optarg, "control", false);
+ break;
+ case QEMU_OPTION_monitor:
+ if (!strncmp(optarg, "stdio", 5)) {
+ warn_report("STDIO not supported in remote process");
+ } else if (strncmp(optarg, "none", 4)) {
+ monitor_parse(optarg, "readline", false);
+ }
+ break;
default:
break;
}
--
2.25.GIT
- [PATCH RESEND v6 19/36] multi-process: Connect Proxy Object with device in the remote process, (continued)
- [PATCH RESEND v6 19/36] multi-process: Connect Proxy Object with device in the remote process, elena . ufimtseva, 2020/04/23
- [PATCH RESEND v6 21/36] multi-process: PCI BAR read/write handling for proxy & remote endpoints, elena . ufimtseva, 2020/04/23
- [PATCH RESEND v6 22/36] multi-process: Synchronize remote memory, elena . ufimtseva, 2020/04/23
- [PATCH RESEND v6 20/36] multi-process: Forward PCI config space acceses to the remote process, elena . ufimtseva, 2020/04/23
- [PATCH RESEND v6 23/36] multi-process: create IOHUB object to handle irq, elena . ufimtseva, 2020/04/23
- [PATCH RESEND v6 25/36] multi-process: Introduce build flags to separate remote process code, elena . ufimtseva, 2020/04/23
- [PATCH RESEND v6 27/36] multi-process: add support to parse device option, elena . ufimtseva, 2020/04/23
- [PATCH RESEND v6 29/36] multi-process: handle heartbeat messages in remote process, elena . ufimtseva, 2020/04/23
- [PATCH RESEND v6 30/36] multi-process: perform device reset in the remote process, elena . ufimtseva, 2020/04/23
- [PATCH RESEND v6 31/36] multi-process/mon: choose HMP commands based on target, elena . ufimtseva, 2020/04/23
- [PATCH RESEND v6 34/36] multi-process/mon: Initialize QMP module for remote processes,
elena . ufimtseva <=
- [PATCH RESEND v6 32/36] multi-process/mon: stub functions to enable QMP module for remote process, elena . ufimtseva, 2020/04/23
- [PATCH RESEND v6 35/36] multi-process: add the concept description to docs/devel/qemu-multiprocess, elena . ufimtseva, 2020/04/23
- [PATCH RESEND v6 02/36] multi-process: Refactor machine_init and exit notifiers, elena . ufimtseva, 2020/04/23
- [PATCH RESEND v6 08/36] multi-process: Add stub functions to facilitate build of multi-process, elena . ufimtseva, 2020/04/23