[Qemu-devel] [RFC PATCH v1 2/8] multi-process QEMU: define proxy-link object

2018-10-12 Thread Jagannathan Raman
ived on the communication channel. Signed-off-by: Jagannathan Raman --- include/glib-compat.h | 4 + include/io/proxy-link.h | 103 +++ io/Makefile.objs| 1 + io/proxy-link.c | 263 4 files changed, 371 insertions(+) cr

[Qemu-devel] [RFC PATCH v1 8/8] multi-process QEMU: synchronize RAM between QEMU & remote device

2018-10-12 Thread Jagannathan Raman
- Setup MemoryListener in QEMU to get all updates to sysmem, and forward all RAM updates to remote device process - Remote device process updates its "system_memory" container using shared file descriptors provided by SYNC_SYSMEM message Signed-off-by: Jagannathan Raman --- hw/qe

[Qemu-devel] [RFC PATCH v1 3/8] multi-process QEMU: setup PCI host bridge for remote device

2018-10-12 Thread Jagannathan Raman
- PCI host bridge is setup for the remote device process. It is implemented using remote-pcihost object. It is an extension of the PCI host bridge setup by QEMU. - remote-pcihost configures a PCI bus which could be used by the remote PCI device to latch on to. Signed-off-by: Jagannathan

[Qemu-devel] [RFC PATCH v1 4/8] multi-process QEMU: setup a machine for remote device process

2018-10-12 Thread Jagannathan Raman
- remote-machine object sets up various subsystems of the remote device process. - PCI host bridge is instantiated - RAM, IO & PCI memory regions are initialized Signed-off-by: Jagannathan Raman --- exec.c| 3 +- hw/scsi/qemu-scsi-dev.c | 9 + include/

[Qemu-devel] [RFC PATCH v1 1/8] multi-process QEMU: build system for remote device process

2018-10-12 Thread Jagannathan Raman
- Makefile changes necessary to support the building of the remote device process is added - functions that are necessary to compile the code, but are not needed at run-time are stubbed out - main() function of remote SCSI device process is implemented Signed-off-by: Jagannathan Raman

[Qemu-devel] [RFC PATCH v1 0/8] multi-process QEMU

2018-10-12 Thread Jagannathan Raman
e. The process is granted access to the file if the process's set is a superset of the file's set. This enforcement can be used to separate multiple instances of devices in the same class. For example, if there are multiple disk devices provides to a guest, each device emulation process

[Qemu-devel] [RFC PATCH v1 7/8] multi-process QEMU: introduce proxy object

2018-10-12 Thread Jagannathan Raman
From: Elena Ufimtseva Define PCI Device proxy object as a parent of TYPE_PCI_DEVICE. PCI Proxy Object will register PCI BARs, MemoryRegionOps to handle access to the BARs and forward those to the remote device. PCI Proxy object intercepts config space reads and writes. In case of pci config

[Qemu-devel] [RFC PATCH v1 5/8] multi-process QEMU: setup memory manager for remote device

2018-10-12 Thread Jagannathan Raman
-by: Jagannathan Raman --- include/io/proxy-link.h | 9 + include/remote/memory.h | 34 ++ remote/Makefile.objs| 1 + remote/memory.c | 93 + 4 files changed, 137 insertions(+) create mode 100644 include/remote/memory.h

[Qemu-devel] [RFC PATCH v1 6/8] multi-process QEMU: remote process initialization

2018-10-12 Thread Jagannathan Raman
Initialize remote process main loop and add the message handling logic. Handle SYNC_SYSMEM message by updating its "system_memory" container using shared file descriptors received from QEMU. Signed-off-by: Jagannathan Raman --- hw/scsi/qemu-scsi-

[Qemu-devel] [PATCH] Do not update coalesced IO range in the case of NOP

2019-02-05 Thread Jagannathan Raman
resulting in the following check to fail in the kernel. This is the cause of the above backtrace. kvm_io_bus_register_dev(): if (bus->dev_count - bus->ioeventfd_count > NR_IOBUS_DEVS - 1) return -ENOSPC; Avoiding coalesced IO region update in the case of NOP fixes this issue. J

[Qemu-devel] [PATCH] memory: Do not update coalesced IO range in the case of NOP

2019-02-05 Thread Jagannathan Raman
Do not add/del coalesced IO ranges in the case where the same FlatRanges are present in both old and new FlatViews Fixes: 3ac7d43a6fbb ("memory: update coalesced_range on transaction_commit") Signed-off-by: Jagannathan Raman --- memory.c | 5 + 1 file changed, 1 insertion(+), 4

[Qemu-devel] [RFC v3 PATCH 02/45] multi-process: util: Add qemu_thread_cancel() to cancel running thread

2019-09-03 Thread Jagannathan Raman
qemu_thread_cancel() added to destroy a given running thread. This will be needed in the following patches. Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva --- include/qemu/thread.h| 1 + util/qemu-thread-posix.c | 10 ++ 2 files

[Qemu-devel] [RFC v3 PATCH 04/45] multi-process: Add stub functions to facilate build of multi-process

2019-09-03 Thread Jagannathan Raman
Add stub functions that are needed during compile time but not in runtime. Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva --- accel/stubs/kvm-stub.c| 5 +++ accel/stubs/tcg-stub.c| 85

[Qemu-devel] [RFC v3 PATCH 05/45] multi-process: Add config option for multi-process QEMU

2019-09-03 Thread Jagannathan Raman
Add a configuration option to separate multi-process code Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva --- configure | 11 +++ 1 file changed, 11 insertions(+) diff --git a/configure b/configure index 714e7fb..b467441 100755

[Qemu-devel] [RFC v3 PATCH 08/45] multi-process: add functions to synchronize proxy and remote endpoints

2019-09-03 Thread Jagannathan Raman
In some cases, for example MMIO read, QEMU has to wait for the remote to complete a command before proceeding. An eventfd based mechanism is added to synchronize QEMU & remote process. Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva --- v1 -

[Qemu-devel] [RFC v3 PATCH 06/45] multi-process: build system for remote device process

2019-09-03 Thread Jagannathan Raman
Modify Makefile to support the building of the remote device process. Implements main() function of remote device process. Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva --- Makefile| 2 ++ Makefile.objs | 22

[Qemu-devel] [RFC v3 PATCH 14/45] mutli-process: build remote command line args

2019-09-03 Thread Jagannathan Raman
From: Elena Ufimtseva Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson --- New patch in v3 hw/proxy/qemu-proxy.c | 80 +-- include/hw/proxy/qemu-proxy.h | 2 +- 2 files changed, 62 insertions

[Qemu-devel] [RFC v3 PATCH 22/45] multi-process: configure remote side devices

2019-09-03 Thread Jagannathan Raman
From: Elena Ufimtseva Add functions to configure remote devices. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/proxy/qemu-proxy.c | 43 ++- include/hw/proxy/qemu-proxy.h | 2 ++ include

[Qemu-devel] [RFC v3 PATCH 12/45] multi-process: remote process initialization

2019-09-03 Thread Jagannathan Raman
Adds the handler to process message from QEMU, Initialize remote process main loop, handles SYNC_SYSMEM message by updating its "system_memory" container using shared file descriptors received from QEMU. Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: J

[Qemu-devel] [RFC v3 PATCH 09/45] multi-process: setup PCI host bridge for remote device

2019-09-03 Thread Jagannathan Raman
PCI host bridge is setup for the remote device process. It is implemented using remote-pcihost object. It is an extension of the PCI host bridge setup by QEMU. Remote-pcihost configures a PCI bus which could be used by the remote PCI device to latch on to. Signed-off-by: Jagannathan Raman

[Qemu-devel] [RFC v3 PATCH 24/45] multi-process: remote: add setup_devices and setup_drive msg processing

2019-09-03 Thread Jagannathan Raman
From: Elena Ufimtseva Receive by remote side the configuration messages and build the device object from JSON device descriptions. Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson --- v1 -> v2: - for new command line suboptions with libvi

[Qemu-devel] [RFC v3 PATCH 26/45] multi-process: remote: add create_done condition

2019-09-03 Thread Jagannathan Raman
From: Elena Ufimtseva Do not allow BAR,MMIO handlers and irq setup to run before the configuration of the devices completes. Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva --- remote/remote-main.c | 29 - 1 file

[Qemu-devel] [RFC v3 PATCH 18/45] multi-process: support dev id in config read/write

2019-09-03 Thread Jagannathan Raman
From: Elena Ufimtseva Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson --- New patch in v3 hw/proxy/qemu-proxy.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/hw/proxy/qemu-proxy.c b/hw/proxy/qemu-proxy.c

[Qemu-devel] [RFC v3 PATCH 30/45] multi-process: add remote option

2019-09-03 Thread Jagannathan Raman
From: Elena Ufimtseva Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson --- New patch in v3 qemu-options.hx | 21 + 1 file changed, 21 insertions(+) diff --git a/qemu-options.hx b/qemu-options.hx index 9621e93..e2dca3d 100644

[Qemu-devel] [RFC v3 PATCH 35/45] multi-process: handle heartbeat messages in remote process

2019-09-03 Thread Jagannathan Raman
From: Elena Ufimtseva and reply back to proxy object. Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva --- remote/remote-main.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/remote/remote-main.c b/remote/remote-main.c index 5552712

[Qemu-devel] [RFC v3 PATCH 01/45] multi-process: memory: alloc RAM from file at offset

2019-09-03 Thread Jagannathan Raman
Allow RAM MemoryRegion to be created from an offset in a file, instead of allocating at offset of 0 by default. This is needed to synchronize RAM between QEMU & remote process. This will be needed for the following patches. Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Si

[Qemu-devel] [RFC v3 PATCH 37/45] multi-process: perform device reset in the remote process

2019-09-03 Thread Jagannathan Raman
Perform device reset in the remote process when QEMU performs device reset. This is required to reset the internal state (like registers, etc...) of emulated devices Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- New patch in v3 hw/proxy

[Qemu-devel] [RFC v3 PATCH 45/45] multi-process: add configure and usage information

2019-09-03 Thread Jagannathan Raman
From: Elena Ufimtseva Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson --- Changes in v3: - since the changes were made to use existing device/drive options, the document was modified to reflect this. --- docs/qemu-multiprocess.txt | 86

[Qemu-devel] [RFC v3 PATCH 39/45] multi-process/mon: build system for QMP module in remote process

2019-09-03 Thread Jagannathan Raman
Makefile changes necessary to compile QMP module for the remote process Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- New patch in v3 Makefile.objs | 7 +++ Makefile.target | 20 +++- hw/core

[Qemu-devel] [RFC v3 PATCH 43/45] multi-process: prevent duplicate memory initialization in remote

2019-09-03 Thread Jagannathan Raman
G Johnson Signed-off-by: Jagannathan Raman --- New patch in v3 hw/proxy/qemu-proxy.c | 13 - include/hw/proxy/qemu-proxy.h | 1 + qdev-monitor.c| 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/hw/proxy/qemu-proxy.c b/hw/proxy/qemu-pro

[Qemu-devel] [RFC v3 PATCH 21/45] multi-process: create IOHUB object to handle irq

2019-09-03 Thread Jagannathan Raman
Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva --- Makefile.target | 1 + hw/proxy/Makefile.objs| 1 - hw/proxy/qemu-proxy.c | 64 + include/hw/pci/pci_ids.h | 3 + include/hw/proxy/qemu-proxy.h | 5 ++ include/io/proxy

[Qemu-devel] [RFC v3 PATCH 27/45] multi-process: add processing of remote drive and device command line

2019-09-03 Thread Jagannathan Raman
From: Elena Ufimtseva Add processing of command line options drive and device. After remote devices are created along with their proxies, signal the proxies to finish the configuration steps. Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva

[Qemu-devel] [RFC v3 PATCH 33/45] multi-process: add support for multiple devices

2019-09-03 Thread Jagannathan Raman
From: Elena Ufimtseva Add suport for multiple devices in one remote process. Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson --- New patch in v3 remote/remote-main.c | 140 ++- 1 file changed

[Qemu-devel] [RFC v3 PATCH 19/45] multi-process: Add LSI device proxy object

2019-09-03 Thread Jagannathan Raman
Adds proxy-lsi53c895a object, as a derivative of the pci-proxy-dev object. This object is the proxy for the lsi53c895a object instantiated by the remote process. Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva --- hw/proxy/Makefile.objs

[Qemu-devel] [RFC v3 PATCH 03/45] multi-process: add a command line option for debug file

2019-09-03 Thread Jagannathan Raman
From: Elena Ufimtseva Can be used with -d rdebug command options when starting qemu. Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson --- include/qemu/log.h | 1 + util/log.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include

[Qemu-devel] [RFC v3 PATCH 29/45] multi-process: refractor vl.c code to re-use in remote

2019-09-03 Thread Jagannathan Raman
From: Elena Ufimtseva Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson --- New patch in v3 Makefile.objs| 2 + remote/Makefile.objs | 1 + vl-parse.c | 157 +++ vl.c

[Qemu-devel] [RFC v3 PATCH 38/45] multi-process/mon: stub functions to enable QMP module for remote process

2019-09-03 Thread Jagannathan Raman
Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- New patch in v3 accel/stubs/tcg-stub.c | 10 +++ configure | 4 ++ include/qemu-common.h | 8 +++ stubs/gdbstub.c| 21 +++ stubs/migration.c | 162

[Qemu-devel] [RFC v3 PATCH 31/45] multi-process: add remote options parser

2019-09-03 Thread Jagannathan Raman
From: Elena Ufimtseva Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson --- New patch in v3 vl.c | 117 +++ 1 file changed, 117 insertions(+) diff --git a/vl.c b/vl.c index dc2558c

[Qemu-devel] [RFC v3 PATCH 40/45] multi-process/mon: Refactor monitor/chardev functions out of vl.c

2019-09-03 Thread Jagannathan Raman
gned-off-by: Jagannathan Raman --- New patch in v3 vl-parse.c | 92 ++ vl.c | 91 - vl.h | 4 +++ 3 files changed, 96 insertions(+), 91 deletions(-) diff --git a/vl-pars

[Qemu-devel] [RFC v3 PATCH 41/45] multi-process/mon: trim HMP command set for remote storage processes

2019-09-03 Thread Jagannathan Raman
Trim down the list of HMP commands available for storage class of remote processes. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- New patch in v3 Makefile.objs | 2 + Makefile.target| 14 +- hmp-scsi-commands

[Qemu-devel] [RFC v3 PATCH 00/45] Initial support of multi-process qemu

2019-09-03 Thread Jagannathan Raman
he communication link to support multiple channels. MMIO transactions are carried out in a separate channel. - Fixed the bugs discovered during testing. Individual patches provide the details of these fixes. Following people contributed to this patchset: John G Johnson Jagannathan R

[Qemu-devel] [RFC v3 PATCH 15/45] multi-process: add support of device id to communication channel

2019-09-03 Thread Jagannathan Raman
From: Elena Ufimtseva Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson --- New patch in v3 include/io/proxy-link.h | 3 +++ io/proxy-link.c | 37 - 2 files changed, 35 insertions(+), 5 deletions

[Qemu-devel] [RFC v3 PATCH 13/45] multi-process: introduce proxy object

2019-09-03 Thread Jagannathan Raman
. In case of pci config write it forwards it to the remote device using communication channel set by proxy-link object. Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson --- hw/Makefile.objs | 2 + hw/proxy/Makefile.objs| 1 + hw

[Qemu-devel] [RFC v3 PATCH 07/45] multi-process: define proxy-link object

2019-09-03 Thread Jagannathan Raman
ived on the communication channel. Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva --- v1 -> v2: - Use default context for main loop instead of a new context v2 -> v3: - Enabled multi-channel support in the communication link include/glib-compat

[Qemu-devel] [RFC v3 PATCH 25/45] multi-process: remote: use fd for socket from parent process

2019-09-03 Thread Jagannathan Raman
From: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva --- 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

[Qemu-devel] [RFC v3 PATCH 11/45] multi-process: setup memory manager for remote device

2019-09-03 Thread Jagannathan Raman
-by: Jagannathan Raman Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva --- Makefile.target | 2 + include/io/proxy-link.h | 11 ++ include/remote/memory.h | 34 + remote/memory.c | 99 + 4 files changed, 146

[Qemu-devel] [RFC v3 PATCH 17/45] multi-process: modify BARs read/write to support dev_id

2019-09-03 Thread Jagannathan Raman
From: Elena Ufimtseva Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Reviewed-by: Liam Merwick --- New patch in v3 hw/proxy/qemu-proxy.c | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/hw/proxy/qemu

[Qemu-devel] [RFC v3 PATCH 20/45] multi-process: Synchronize remote memory

2019-09-03 Thread Jagannathan Raman
process receives the message and processes it in the handler for SYNC_SYSMEM message. Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva --- v2 -> v3: - Refactored code to obtain fd from host address, added get_fd_from_hosta

[Qemu-devel] [RFC v3 PATCH 23/45] multi-process: add qdev_proxy_add to create proxy devices

2019-09-03 Thread Jagannathan Raman
From: Elena Ufimtseva This is handled while parsing the command line options. The parsed options are being sent to remote process as the messgaes containing JSON strings. Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva --- v1 -> v2: - pa

[Qemu-devel] [RFC v3 PATCH 34/45] multi-process: add heartbeat timer and signal handler

2019-09-03 Thread Jagannathan Raman
From: Elena Ufimtseva Add a signal handler for launched remote processes and set up the heartbeat timer for remote processes. Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- hw/proxy/qemu-proxy.c | 101

[Qemu-devel] [RFC v3 PATCH 16/45] multi-process: PCI BAR read/write handling for proxy & remote endpoints

2019-09-03 Thread Jagannathan Raman
-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson --- hw/proxy/qemu-proxy.c | 50 + include/hw/proxy/qemu-proxy.h | 5 +++ include/io/proxy-link.h | 12 +++ remote/remote-main.c | 73

[Qemu-devel] [RFC v3 PATCH 32/45] multi-process: add parse_cmdline in remote process

2019-09-03 Thread Jagannathan Raman
From: Elena Ufimtseva Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson --- New patch in v3 remote/Makefile.objs | 1 + remote/remote-main.c | 11 + remote/remote-opts.c | 113 +++ remote

[Qemu-devel] [RFC v3 PATCH 28/45] multi-process: Introduce build flags to separate remote process code

2019-09-03 Thread Jagannathan Raman
Introduce SCSI_PROCESS & REMOTE_PROCESS build flags to separate code that applies only to remote processes. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- New patch in v3 Makefile.target | 4 rules.mak | 2 +- 2 files change

[Qemu-devel] [RFC v3 PATCH 44/45] multi-process: add the concept description to docs/devel/qemu-multiprocess

2019-09-03 Thread Jagannathan Raman
From: John G Johnson Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- v2 -> v3: - Updated with latest design of this project docs/devel/qemu-multiprocess.txt | 627 +++ 1 file changed, 627 inserti

[Qemu-devel] [RFC v3 PATCH 36/45] multi-process: Use separate MMIO communication channel

2019-09-03 Thread Jagannathan Raman
Using a separate communication channel for MMIO helps with improving Performance Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson --- New patch in v3 hw/proxy/qemu-proxy.c | 38 ++ include/hw/proxy/qemu

[Qemu-devel] [RFC v3 PATCH 42/45] multi-process/mon: Initialize QMP module for remote processes

2019-09-03 Thread Jagannathan Raman
Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- New patch in v3 remote/remote-main.c | 11 +++ remote/remote-opts.c | 10 ++ 2 files changed, 21 insertions(+) diff --git a/remote/remote-main.c b/remote/remote-main.c index

[Qemu-devel] [RFC v3 PATCH 10/45] multi-process: setup a machine object for remote device process

2019-09-03 Thread Jagannathan Raman
remote-machine object sets up various subsystems of the remote device process. Instantiate PCI host bridge object and initialize RAM, IO & PCI memory regions. Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva --- exec.c|

[RFC v4 PATCH 06/49] multi-process: build system for remote device process

2019-10-24 Thread Jagannathan Raman
Modify Makefile to support the building of the remote device process. Implements main() function of remote device process. Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva --- Makefile| 2 ++ Makefile.objs | 22

[RFC v4 PATCH 14/49] mutli-process: build remote command line args

2019-10-24 Thread Jagannathan Raman
From: Elena Ufimtseva Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson --- New patch in v3 hw/proxy/qemu-proxy.c | 80 +-- include/hw/proxy/qemu-proxy.h | 2 +- 2 files changed, 62 insertions

[RFC v4 PATCH 04/49] multi-process: Add stub functions to facilate build of multi-process

2019-10-24 Thread Jagannathan Raman
Add stub functions that are needed during compile time but not in runtime. Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva --- accel/stubs/kvm-stub.c| 5 +++ accel/stubs/tcg-stub.c| 96

[RFC v4 PATCH 02/49] multi-process: util: Add qemu_thread_cancel() to cancel running thread

2019-10-24 Thread Jagannathan Raman
qemu_thread_cancel() added to destroy a given running thread. This will be needed in the following patches. Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva --- include/qemu/thread.h| 1 + util/qemu-thread-posix.c | 10 ++ 2 files

[RFC v4 PATCH 30/49] multi-process: send heartbeat messages to remote

2019-10-24 Thread Jagannathan Raman
From: Elena Ufimtseva In order to detect remote processes which are hung, the proxy periodically sends heartbeat messages to confirm if the remote process is alive Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva --- hw/proxy/qemu-proxy.c

[RFC v4 PATCH 34/49] multi-process/mon: choose HMP commands based on target

2019-10-24 Thread Jagannathan Raman
From: Elena Ufimtseva Add "targets" field to HMP command definition to select the targets which would be supported by each command Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- New patch in v4 hmp-commands-info.hx | 10 +

[RFC v4 PATCH 41/49] multi-process/mig: Enable VMSD save in the Proxy object

2019-10-24 Thread Jagannathan Raman
Collect the VMSD from remote process on the source and save it to the channel leading to the destination Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- New patch in v4 hw/proxy/qemu-proxy.c | 132

[RFC v4 PATCH 48/49] multi-process: add the concept description to docs/devel/qemu-multiprocess

2019-10-24 Thread Jagannathan Raman
From: John G Johnson Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- v2 -> v3: - Updated with latest design of this project v3 -> v4: - Updated document to RST format docs/devel/index.rst |1 + docs/deve

[RFC v4 PATCH 23/49] multi-process: remote: add create_done condition

2019-10-24 Thread Jagannathan Raman
From: Elena Ufimtseva Do not allow BAR,MMIO handlers and irq setup to run before the configuration of the devices completes. Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva --- remote/remote-main.c | 29 - 1 file

[RFC v4 PATCH 22/49] multi-process: remote: use fd for socket from parent process

2019-10-24 Thread Jagannathan Raman
From: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva --- 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 5b3ffd8..cb2829e 100644

[RFC v4 PATCH 36/49] multi-process/mon: enable QMP module support in the remote process

2019-10-24 Thread Jagannathan Raman
Build system changes to enable QMP module in the remote process Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- New patch in v3 Makefile.objs | 9 + Makefile.target| 34 +-- hmp-commands.hx

[RFC v4 PATCH 40/49] multi-process/mig: build migration module in the remote process

2019-10-24 Thread Jagannathan Raman
Add Makefile support to enable migration in remote process Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- New patch in v4 Makefile.objs | 4 Makefile.target | 1 + migration/Makefile.objs | 12 +++- net

[RFC v4 PATCH 26/49] multi-process: refractor vl.c code to re-use in remote

2019-10-24 Thread Jagannathan Raman
From: Elena Ufimtseva Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson --- New patch in v3 Makefile.objs| 2 + remote/Makefile.objs | 1 + vl-parse.c | 158 +++ vl.c

[RFC v4 PATCH 32/49] multi-process: Use separate MMIO communication channel

2019-10-24 Thread Jagannathan Raman
Using a separate communication channel for MMIO helps with improving Performance Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson --- New patch in v3 hw/proxy/qemu-proxy.c | 39 +++ include/hw/proxy

[RFC v4 PATCH 24/49] multi-process: add processing of remote drive and device command line

2019-10-24 Thread Jagannathan Raman
From: Elena Ufimtseva Add processing of command line options drive and device. After remote devices are created along with their proxies, signal the proxies to finish the configuration steps. Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva

[RFC v4 PATCH 37/49] multi-process/mon: Refactor monitor/chardev functions out of vl.c

2019-10-24 Thread Jagannathan Raman
gned-off-by: Jagannathan Raman --- New patch in v3 v3 -> v4 - Moved monitor related functions to monitor.c and chardev functions to char.c chardev/char.c| 14 include/chardev/char.h| 1 + include/monitor/monitor.h | 2 ++ monitor/monitor.c

[RFC v4 PATCH 25/49] multi-process: Introduce build flags to separate remote process code

2019-10-24 Thread Jagannathan Raman
Introduce SCSI_PROCESS & REMOTE_PROCESS build flags to separate code that applies only to remote processes. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- New patch in v3 Makefile.target | 4 rules.mak | 2 +- 2 files change

[RFC v4 PATCH 00/49] Initial support of multi-process qemu

2019-10-24 Thread Jagannathan Raman
ates the feedback we received for v3 & adds support for live migrating the remote process. Following people contributed to this patchset: John G Johnson Jagannathan Raman Elena Ufimtseva Kanth Ghatraju For full concept writeup about QEMU disaggregation refer to docs/devel/qemu-multipro

[RFC v4 PATCH 05/49] multi-process: Add config option for multi-process QEMU

2019-10-24 Thread Jagannathan Raman
Add a configuration option to separate multi-process code Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva --- configure | 11 +++ 1 file changed, 11 insertions(+) diff --git a/configure b/configure index 145fcab..135afa9 100755

[RFC v4 PATCH 03/49] multi-process: add a command line option for debug file

2019-10-24 Thread Jagannathan Raman
From: Elena Ufimtseva Can be used with -d rdebug command options when starting qemu. Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson --- include/qemu/log.h | 1 + util/log.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include

[RFC v4 PATCH 01/49] multi-process: memory: alloc RAM from file at offset

2019-10-24 Thread Jagannathan Raman
Allow RAM MemoryRegion to be created from an offset in a file, instead of allocating at offset of 0 by default. This is needed to synchronize RAM between QEMU & remote process. This will be needed for the following patches. Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Si

[RFC v4 PATCH 39/49] multi-process: prevent duplicate memory initialization in remote

2019-10-24 Thread Jagannathan Raman
G Johnson Signed-off-by: Jagannathan Raman --- New patch in v3 hw/proxy/qemu-proxy.c | 13 - include/hw/proxy/qemu-proxy.h | 1 + qdev-monitor.c| 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/hw/proxy/qemu-proxy.c b/hw/proxy/qemu-pro

[RFC v4 PATCH 28/49] multi-process: add remote options parser

2019-10-24 Thread Jagannathan Raman
From: Elena Ufimtseva Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson --- New patch in v3 vl.c | 117 +++ 1 file changed, 117 insertions(+) diff --git a/vl.c b/vl.c index 3fef694

[RFC v4 PATCH 29/49] multi-process: add parse_cmdline in remote process

2019-10-24 Thread Jagannathan Raman
From: Elena Ufimtseva Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson --- New patch in v3 remote/Makefile.objs | 1 + remote/remote-main.c | 11 + remote/remote-opts.c | 115 +++ remote

[RFC v4 PATCH 11/49] multi-process: setup memory manager for remote device

2019-10-24 Thread Jagannathan Raman
-by: Jagannathan Raman Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva --- Makefile.target | 2 + include/io/mpqemu-link.h | 11 ++ include/remote/memory.h | 34 + remote/memory.c | 99 4 files changed, 146

[RFC v4 PATCH 13/49] multi-process: introduce proxy object

2019-10-24 Thread Jagannathan Raman
. In case of pci config write it forwards it to the remote device using communication channel set by proxy-link object. Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson --- hw/Makefile.objs | 2 + hw/proxy/Makefile.objs| 1 + hw

[RFC v4 PATCH 09/49] multi-process: setup PCI host bridge for remote device

2019-10-24 Thread Jagannathan Raman
PCI host bridge is setup for the remote device process. It is implemented using remote-pcihost object. It is an extension of the PCI host bridge setup by QEMU. Remote-pcihost configures a PCI bus which could be used by the remote PCI device to latch on to. Signed-off-by: Jagannathan Raman

[RFC v4 PATCH 16/49] multi-process: Add LSI device proxy object

2019-10-24 Thread Jagannathan Raman
Adds proxy-lsi53c895a object, as a derivative of the pci-proxy-dev object. This object is the proxy for the lsi53c895a object instantiated by the remote process. Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva --- hw/proxy/Makefile.objs

[RFC v4 PATCH 35/49] multi-process/mon: stub functions to enable QMP module for remote process

2019-10-24 Thread Jagannathan Raman
Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- New patch in v3 accel/stubs/tcg-stub.c | 10 +++ configure | 4 ++ include/qemu-common.h | 8 +++ stubs/gdbstub.c| 21 +++ stubs/migration.c | 162

[RFC v4 PATCH 31/49] multi-process: handle heartbeat messages in remote process

2019-10-24 Thread Jagannathan Raman
From: Elena Ufimtseva If the remote process is alive, it responds to proxy's heartbeat messages Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva --- remote/remote-main.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/remote/remote

[RFC v4 PATCH 47/49] multi-process: Enable support for multiple devices in remote

2019-10-24 Thread Jagannathan Raman
From: Elena Ufimtseva Add support to allow multiple devices to be configured in the remote process Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- New patch in v4 hw/proxy/qemu-proxy.c | 3 +++ include/hw/proxy/qemu-proxy.h | 3

[RFC v4 PATCH 17/49] multi-process: Synchronize remote memory

2019-10-24 Thread Jagannathan Raman
process receives the message and processes it in the handler for SYNC_SYSMEM message. Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva --- v2 -> v3: - Refactored code to obtain fd from host address, added get_fd_from_hosta

[RFC v4 PATCH 18/49] multi-process: create IOHUB object to handle irq

2019-10-24 Thread Jagannathan Raman
Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva --- Makefile.target | 1 + hw/proxy/Makefile.objs| 1 - hw/proxy/qemu-proxy.c | 54 ++ include/hw/pci/pci_ids.h | 3 + include/hw/proxy/qemu-proxy.h | 5 ++ include/io/mpqemu

[RFC v4 PATCH 20/49] multi-process: add qdev_proxy_add to create proxy devices

2019-10-24 Thread Jagannathan Raman
From: Elena Ufimtseva This is handled while parsing the command line options. The parsed options are being sent to remote process as the messgaes containing JSON strings. Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva --- v1 -> v2: - pa

[RFC v4 PATCH 21/49] multi-process: remote: add setup_devices and setup_drive msg processing

2019-10-24 Thread Jagannathan Raman
From: Elena Ufimtseva Receive by remote side the configuration messages and build the device object from JSON device descriptions. Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson --- v1 -> v2: - for new command line suboptions with libvi

[RFC v4 PATCH 07/49] multi-process: define mpqemu-link object

2019-10-24 Thread Jagannathan Raman
ived on the communication channel. Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva --- v1 -> v2: - Use default context for main loop instead of a new context v2 -> v3: - Enabled multi-channel support in the communication link v3 -> v4: - Ch

[RFC v4 PATCH 44/49] multi-process/mig: refactor runstate_check into common file

2019-10-24 Thread Jagannathan Raman
From: Elena Ufimtseva runstate_check file is refactored into vl-parse.c Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- New patch in v4 Makefile.objs | 2 ++ include/sysemu/runstate.h | 2 ++ runstate.c| 36

[RFC v4 PATCH 08/49] multi-process: add functions to synchronize proxy and remote endpoints

2019-10-24 Thread Jagannathan Raman
In some cases, for example MMIO read, QEMU has to wait for the remote to complete a command before proceeding. An eventfd based mechanism is added to synchronize QEMU & remote process. Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva --- v1 -

[RFC v4 PATCH 45/49] multi-process/mig: Synchronize runstate of remote process

2019-10-24 Thread Jagannathan Raman
From: Elena Ufimtseva Synchronize the runstate of the remote process with that of QEMU Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- New patch in v4 hw/proxy/qemu-proxy.c | 18 ++ include/hw/proxy/qemu-proxy.h

[RFC v4 PATCH 33/49] multi-process: perform device reset in the remote process

2019-10-24 Thread Jagannathan Raman
Perform device reset in the remote process when QEMU performs device reset. This is required to reset the internal state (like registers, etc...) of emulated devices Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- New patch in v3 hw/proxy

[RFC v4 PATCH 10/49] multi-process: setup a machine object for remote device process

2019-10-24 Thread Jagannathan Raman
remote-machine object sets up various subsystems of the remote device process. Instantiate PCI host bridge object and initialize RAM, IO & PCI memory regions. Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva --- exec.c|

[RFC v4 PATCH 19/49] multi-process: configure remote side devices

2019-10-24 Thread Jagannathan Raman
From: Elena Ufimtseva Add functions to configure remote devices. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/proxy/qemu-proxy.c | 39 ++- include/hw/proxy/qemu-proxy.h | 2 ++ include/io

[RFC v4 PATCH 15/49] multi-process: PCI BAR read/write handling for proxy & remote endpoints

2019-10-24 Thread Jagannathan Raman
-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson --- hw/proxy/qemu-proxy.c | 77 +++ include/hw/proxy/qemu-proxy.h | 21 ++-- include/io/mpqemu-link.h | 12 +++ remote/remote-main.c | 73

  1   2   3   4   5   >