[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 22/50] multi-process: remote: use fd for socket from parent pr
From: |
Jagannathan Raman |
Subject: |
[PATCH v5 22/50] multi-process: remote: use fd for socket from parent process |
Date: |
Mon, 24 Feb 2020 15:55:13 -0500 |
From: Elena Ufimtseva <address@hidden>
Signed-off-by: Jagannathan Raman <address@hidden>
Signed-off-by: John G Johnson <address@hidden>
Signed-off-by: Elena Ufimtseva <address@hidden>
---
remote/remote-main.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/remote/remote-main.c b/remote/remote-main.c
index 3a67cb9..455cfb6 100644
--- a/remote/remote-main.c
+++ b/remote/remote-main.c
@@ -51,6 +51,7 @@
#include "block/qdict.h"
#include "qapi/qmp/qlist.h"
#include "qemu/log.h"
+#include "qemu/cutils.h"
static MPQemuLinkState *mpqemu_link;
PCIDevice *remote_pci_dev;
@@ -400,6 +401,7 @@ finalize_loop:
int main(int argc, char *argv[])
{
Error *err = NULL;
+ int fd = -1;
module_call_init(MODULE_INIT_QOM);
@@ -424,7 +426,13 @@ int main(int argc, char *argv[])
return -1;
}
- mpqemu_init_channel(mpqemu_link, &mpqemu_link->com, STDIN_FILENO);
+ fd = qemu_parse_fd(argv[1]);
+ if (fd == -1) {
+ printf("Failed to parse fd for remote process.\n");
+ return -EINVAL;
+ }
+
+ mpqemu_init_channel(mpqemu_link, &mpqemu_link->com, fd);
mpqemu_link_set_callback(mpqemu_link, process_msg);
mpqemu_start_coms(mpqemu_link);
--
1.8.3.1
- [PATCH v5 16/50] multi-process: Synchronize remote memory, (continued)
- [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, 2020/02/24
- [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 <=
- [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
- [PATCH v5 31/50] multi-process: handle heartbeat messages in remote process, Jagannathan Raman, 2020/02/24
- [PATCH v5 38/50] multi-process/mon: Initialize QMP module for remote processes, Jagannathan Raman, 2020/02/24