[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC v3 PATCH 25/45] multi-process: remote: use fd for sock
From: |
Jagannathan Raman |
Subject: |
[Qemu-devel] [RFC v3 PATCH 25/45] multi-process: remote: use fd for socket from parent process |
Date: |
Tue, 3 Sep 2019 16:37:51 -0400 |
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 3e92a83..e284d5f 100644
--- a/remote/remote-main.c
+++ b/remote/remote-main.c
@@ -63,6 +63,7 @@
#include "block/qdict.h"
#include "qapi/qmp/qlist.h"
#include "qemu/log.h"
+#include "qemu/cutils.h"
static ProxyLinkState *proxy_link;
PCIDevice *remote_pci_dev;
@@ -439,6 +440,7 @@ finalize_loop:
int main(int argc, char *argv[])
{
Error *err = NULL;
+ int fd = -1;
module_call_init(MODULE_INIT_QOM);
@@ -461,7 +463,13 @@ int main(int argc, char *argv[])
return -1;
}
- proxy_link_init_channel(proxy_link, &proxy_link->com, STDIN_FILENO);
+ fd = qemu_parse_fd(argv[1]);
+ if (fd == -1) {
+ printf("Failed to parse fd for remote process.\n");
+ return -EINVAL;
+ }
+
+ proxy_link_init_channel(proxy_link, &proxy_link->com, fd);
proxy_link_set_callback(proxy_link, process_msg);
start_handler(proxy_link);
--
1.8.3.1
- [Qemu-devel] [RFC v3 PATCH 16/45] multi-process: PCI BAR read/write handling for proxy & remote endpoints, (continued)
- [Qemu-devel] [RFC v3 PATCH 16/45] multi-process: PCI BAR read/write handling for proxy & remote endpoints, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 09/45] multi-process: setup PCI host bridge for remote device, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 18/45] multi-process: support dev id in config read/write, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 17/45] multi-process: modify BARs read/write to support dev_id, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 19/45] multi-process: Add LSI device proxy object, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 22/45] multi-process: configure remote side devices, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 20/45] multi-process: Synchronize remote memory, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 21/45] multi-process: create IOHUB object to handle irq, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 25/45] multi-process: remote: use fd for socket from parent process,
Jagannathan Raman <=
- [Qemu-devel] [RFC v3 PATCH 24/45] multi-process: remote: add setup_devices and setup_drive msg processing, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 27/45] multi-process: add processing of remote drive and device command line, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 26/45] multi-process: remote: add create_done condition, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 23/45] multi-process: add qdev_proxy_add to create proxy devices, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 29/45] multi-process: refractor vl.c code to re-use in remote, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 28/45] multi-process: Introduce build flags to separate remote process code, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 30/45] multi-process: add remote option, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 32/45] multi-process: add parse_cmdline in remote process, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 31/45] multi-process: add remote options parser, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 34/45] multi-process: add heartbeat timer and signal handler, Jagannathan Raman, 2019/09/03