[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH RESEND v6 18/36] multi-process: Initialize Proxy Object's communi
From: |
elena . ufimtseva |
Subject: |
[PATCH RESEND v6 18/36] multi-process: Initialize Proxy Object's communication channel |
Date: |
Wed, 22 Apr 2020 21:13:53 -0700 |
From: Jagannathan Raman <address@hidden>
Add "socket" object property which initializes the communication channel
Signed-off-by: Elena Ufimtseva <address@hidden>
Signed-off-by: Jagannathan Raman <address@hidden>
Signed-off-by: John G Johnson <address@hidden>
---
hw/proxy/qemu-proxy.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/hw/proxy/qemu-proxy.c b/hw/proxy/qemu-proxy.c
index bf6c4117ef..40bf56fd37 100644
--- a/hw/proxy/qemu-proxy.c
+++ b/hw/proxy/qemu-proxy.c
@@ -14,6 +14,25 @@
#include "hw/proxy/qemu-proxy.h"
#include "hw/pci/pci.h"
+static void proxy_set_socket(Object *obj, const char *str, Error **errp)
+{
+ PCIProxyDev *pdev = PCI_PROXY_DEV(obj);
+
+ pdev->socket = atoi(str);
+
+ mpqemu_init_channel(pdev->mpqemu_link, &pdev->mpqemu_link->com,
+ pdev->socket);
+}
+
+static void proxy_init(Object *obj)
+{
+ PCIProxyDev *pdev = PCI_PROXY_DEV(obj);
+
+ pdev->mpqemu_link = mpqemu_link_create();
+
+ object_property_add_str(obj, "socket", NULL, proxy_set_socket, NULL);
+}
+
static void pci_proxy_dev_realize(PCIDevice *device, Error **errp)
{
PCIProxyDev *dev = PCI_PROXY_DEV(device);
@@ -41,6 +60,7 @@ static const TypeInfo pci_proxy_dev_type_info = {
.instance_size = sizeof(PCIProxyDev),
.class_size = sizeof(PCIProxyDevClass),
.class_init = pci_proxy_dev_class_init,
+ .instance_init = proxy_init,
.interfaces = (InterfaceInfo[]) {
{ INTERFACE_CONVENTIONAL_PCI_DEVICE },
{ },
--
2.25.GIT
- [PATCH RESEND v6 04/36] multi-process: Refactor chardev functions out of vl.c, (continued)
- [PATCH RESEND v6 04/36] multi-process: Refactor chardev functions out of vl.c, elena . ufimtseva, 2020/04/23
- [PATCH RESEND v6 03/36] command-line: refractor parser code, elena . ufimtseva, 2020/04/23
- [PATCH RESEND v6 05/36] multi-process: Refactor monitor functions out of vl.c, elena . ufimtseva, 2020/04/23
- [PATCH RESEND v6 01/36] memory: alloc RAM from file at offset, elena . ufimtseva, 2020/04/23
- [PATCH RESEND v6 06/36] monitor: destaticize HMP commands, elena . ufimtseva, 2020/04/23
- [PATCH RESEND v6 09/36] multi-process: Add config option for multi-process QEMU, elena . ufimtseva, 2020/04/23
- [PATCH RESEND v6 07/36] multi-process: add a command line option for debug file, elena . ufimtseva, 2020/04/23
- [PATCH RESEND v6 13/36] multi-process: setup PCI host bridge for remote device, elena . ufimtseva, 2020/04/23
- [PATCH RESEND v6 15/36] multi-process: setup memory manager for remote device, elena . ufimtseva, 2020/04/23
- [PATCH RESEND v6 16/36] multi-process: remote process initialization, elena . ufimtseva, 2020/04/23
- [PATCH RESEND v6 18/36] multi-process: Initialize Proxy Object's communication channel,
elena . ufimtseva <=
- [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