[PATCH v12 03/19] memory: alloc RAM from file at offset

2020-12-01 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. Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Reviewed-by: St

[PATCH v12 00/19] Initial support for multi-process Qemu

2020-12-01 Thread Jagannathan Raman
e qemu-devel mailing list. You can find them by following the links below ([1] - [11]).Following people contributed to the design and implementation of this project: Jagannathan Raman Elena Ufimtseva John G Johnson Stefan Hajnoczi Konrad Wilk Kanth Ghatraju We would like to thank QE

[PATCH v12 07/19] multi-process: add qio channel function to transmit data and fds

2020-12-01 Thread Jagannathan Raman
From: Elena Ufimtseva Adds QIO channel functions that transmits the input iovs as well as the supplied fds. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- include/io/channel.h | 24 io

[PATCH v12 01/19] multi-process: add the concept description to docs/devel/qemu-multiprocess

2020-12-01 Thread Jagannathan Raman
From: John G Johnson Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- docs/devel/index.rst | 1 + docs/devel/multi-process.rst | 966 +++ MAINTAINERS

[PATCH v12 09/19] multi-process: Initialize message handler in remote device

2020-12-01 Thread Jagannathan Raman
Initializes the message handler function in the remote process. It is called whenever there's an event pending on QIOChannel that registers this function. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- include/hw

[PATCH v12 06/19] multi-process: setup a machine object for remote device process

2020-12-01 Thread Jagannathan Raman
x-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 Reviewed-by: Stefan Hajn

[PATCH v12 12/19] multi-process: introduce proxy object

2020-12-01 Thread Jagannathan Raman
From: Elena Ufimtseva Defines a PCI Device proxy object as a child of TYPE_PCI_DEVICE. Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Reviewed-by: Stefan Hajnoczi --- include/hw/remote/proxy.h | 36 + hw/remote/proxy.c

[PATCH v12 15/19] multi-process: PCI BAR read/write handling for proxy & remote endpoints

2020-12-01 Thread Jagannathan Raman
Proxy device object implements handler for PCI BAR writes and reads. The handler uses BAR_WRITE/BAR_READ message to communicate to the remote process with the BAR address and value to be written/read. The remote process implements handler for BAR_WRITE/BAR_READ message. Signed-off-by: Jagannathan

[PATCH v12 05/19] multi-process: setup PCI host bridge for remote device

2020-12-01 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 Signed

[PATCH v12 13/19] multi-process: add proxy communication functions

2020-12-01 Thread Jagannathan Raman
From: Elena Ufimtseva Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Reviewed-by: Stefan Hajnoczi --- include/hw/remote/mpqemu-link.h | 4 hw/remote/mpqemu-link.c | 38 ++ 2 files changed, 42

[PATCH v12 16/19] multi-process: Synchronize remote memory

2020-12-01 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 Reviewed-by: Stefan Hajnoczi --- include/hw/remote/memory-sync.h | 27 ++ include/hw/remote/proxy.h

[PATCH v12 18/19] multi-process: Retrieve PCI info from remote process

2020-12-01 Thread Jagannathan Raman
Retrieve PCI configuration info about the remote device and configure the Proxy PCI object based on the returned information Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- hw/remote/proxy.c | 85

[PATCH v12 10/19] multi-process: Associate fd of a PCIDevice with its object

2020-12-01 Thread Jagannathan Raman
Associate the file descriptor for a PCIDevice in remote process with DeviceState object. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- include/hw/remote/remote-obj.h | 42 +++ hw/remote/message.c

[PATCH v12 17/19] multi-process: create IOHUB object to handle irq

2020-12-01 Thread Jagannathan Raman
Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva Reviewed-by: Stefan Hajnoczi --- include/hw/pci/pci_ids.h| 3 + include/hw/remote/iohub.h | 42 ++ include/hw/remote/machine.h | 3 + include/hw/remote/mpqemu-link.h | 1 + include/hw/remote

[PATCH v12 02/19] multi-process: add configure and usage information

2020-12-01 Thread Jagannathan Raman
From: Elena Ufimtseva Adds documentation explaining the command-line arguments needed to use multi-process. Also adds a python script that illustrates the usage. Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Reviewed-by: Stefan Hajnoczi

[PATCH v12 11/19] multi-process: setup memory manager for remote device

2020-12-01 Thread Jagannathan Raman
SyncSysMemMsg message format is defined. It is used to send file descriptors of the RAM regions to remote device. RAM on the remote device is configured with a set of file descriptors. Old RAM regions are deleted and new regions, each with an fd, is added to the RAM. Signed-off-by: Jagannathan

[PATCH v12 04/19] multi-process: Add config option for multi-process QEMU

2020-12-01 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 Reviewed-by: Stefan Hajnoczi --- accel/Kconfig | 1 + hw/Kconfig| 1 + hw/remote/Kconfig | 3 +++ 3 files changed, 5 insertions

[PATCH v12 14/19] multi-process: Forward PCI config space acceses to the remote process

2020-12-01 Thread Jagannathan Raman
From: Elena Ufimtseva The Proxy Object sends the PCI config space accesses as messages to the remote process over the communication channel Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Reviewed-by: Stefan Hajnoczi --- include/hw/remote

[PATCH v12 19/19] multi-process: perform device reset in the remote process

2020-12-01 Thread Jagannathan Raman
From: Elena Ufimtseva 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 Reviewed

[PATCH v12 08/19] multi-process: define MPQemuMsg format and transmission functions

2020-12-01 Thread Jagannathan Raman
, outside of co-routine context will block IOThread; Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva --- include/hw/remote/mpqemu-link.h | 60 ++ hw/remote/mpqemu-link.c | 242 MAINTAINERS

[PATCH v16 01/20] multi-process: add the concept description to docs/devel/qemu-multiprocess

2021-01-10 Thread Jagannathan Raman
From: John G Johnson Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- docs/devel/index.rst | 1 + docs/devel/multi-process.rst | 966 +++ MAINTAINERS

[PATCH v16 16/20] multi-process: PCI BAR read/write handling for proxy & remote endpoints

2021-01-10 Thread Jagannathan Raman
Proxy device object implements handler for PCI BAR writes and reads. The handler uses BAR_WRITE/BAR_READ message to communicate to the remote process with the BAR address and value to be written/read. The remote process implements handler for BAR_WRITE/BAR_READ message. Signed-off-by: Jagannathan

[PATCH v16 20/20] multi-process: perform device reset in the remote process

2021-01-10 Thread Jagannathan Raman
From: Elena Ufimtseva 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 Reviewed

[PATCH v16 06/20] multi-process: setup a machine object for remote device process

2021-01-10 Thread Jagannathan Raman
x-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 Reviewed-by: Stefan Hajn

[PATCH v16 10/20] multi-process: Initialize message handler in remote device

2021-01-10 Thread Jagannathan Raman
Initializes the message handler function in the remote process. It is called whenever there's an event pending on QIOChannel that registers this function. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- include/hw

[PATCH v16 03/20] memory: alloc RAM from file at offset

2021-01-10 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. Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Reviewed-by: St

[PATCH v16 12/20] multi-process: setup memory manager for remote device

2021-01-10 Thread Jagannathan Raman
SyncSysMemMsg message format is defined. It is used to send file descriptors of the RAM regions to remote device. RAM on the remote device is configured with a set of file descriptors. Old RAM regions are deleted and new regions, each with an fd, is added to the RAM. Signed-off-by: Jagannathan

[PATCH v16 04/20] multi-process: Add config option for multi-process QEMU

2021-01-10 Thread Jagannathan Raman
Add configuration options to enable or disable multiprocess QEMU code Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva Reviewed-by: Stefan Hajnoczi --- configure | 10 ++ meson.build | 4 +++- Kconfig.host | 4 hw

[PATCH v16 08/20] io: add qio_channel_readv_full_all_eof & qio_channel_readv_full_all helpers

2021-01-10 Thread Jagannathan Raman
From: Elena Ufimtseva Adds qio_channel_readv_full_all_eof() and qio_channel_readv_full_all() to read both data and FDs. Refactors existing code to use these helpers. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- include/io/channel.h | 51

[PATCH v16 19/20] multi-process: Retrieve PCI info from remote process

2021-01-10 Thread Jagannathan Raman
Retrieve PCI configuration info about the remote device and configure the Proxy PCI object based on the returned information Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- hw/remote/proxy.c | 84

[PATCH v16 14/20] multi-process: add proxy communication functions

2021-01-10 Thread Jagannathan Raman
From: Elena Ufimtseva Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Reviewed-by: Stefan Hajnoczi --- include/hw/remote/mpqemu-link.h | 4 hw/remote/mpqemu-link.c | 34 ++ 2 files changed, 38

[PATCH v16 07/20] io: add qio_channel_writev_full_all helper

2021-01-10 Thread Jagannathan Raman
From: Elena Ufimtseva Adds qio_channel_writev_full_all() to transmit both data and FDs. Refactors existing code to use this helper. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi Acked-by: Daniel P. Berrangé

[PATCH v16 02/20] multi-process: add configure and usage information

2021-01-10 Thread Jagannathan Raman
From: Elena Ufimtseva Adds documentation explaining the command-line arguments needed to use multi-process. Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Reviewed-by: Stefan Hajnoczi --- docs/multi-process.rst | 64

[PATCH v16 00/20] Initial support for multi-process Qemu

2021-01-10 Thread Jagannathan Raman
osted 15 versions on the qemu-devel mailing list. You can find them by following the links below ([1] - [15]). Following people contributed to the design and implementation of this project: Jagannathan Raman Elena Ufimtseva John G Johnson Stefan Hajnoczi Konrad Wilk Kanth Ghatraju We would like

[PATCH v16 15/20] multi-process: Forward PCI config space acceses to the remote process

2021-01-10 Thread Jagannathan Raman
From: Elena Ufimtseva The Proxy Object sends the PCI config space accesses as messages to the remote process over the communication channel Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Reviewed-by: Stefan Hajnoczi --- include/hw/remote

[PATCH v16 11/20] multi-process: Associate fd of a PCIDevice with its object

2021-01-10 Thread Jagannathan Raman
Associate the file descriptor for a PCIDevice in remote process with DeviceState object. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- hw/remote/remote-obj.c | 203

[PATCH v16 09/20] multi-process: define MPQemuMsg format and transmission functions

2021-01-10 Thread Jagannathan Raman
From: Elena Ufimtseva Defines MPQemuMsg, which is the message that is sent to the remote process. This message is sent over QIOChannel and is used to command the remote process to perform various tasks. Define transmission functions used by proxy and by remote. Signed-off-by: Jagannathan Raman

[PATCH v16 13/20] multi-process: introduce proxy object

2021-01-10 Thread Jagannathan Raman
From: Elena Ufimtseva Defines a PCI Device proxy object as a child of TYPE_PCI_DEVICE. Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Reviewed-by: Stefan Hajnoczi --- include/hw/remote/proxy.h | 33 hw/remote/proxy.c

[PATCH v16 05/20] multi-process: setup PCI host bridge for remote device

2021-01-10 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 Signed

[PATCH v16 18/20] multi-process: create IOHUB object to handle irq

2021-01-10 Thread Jagannathan Raman
Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva Reviewed-by: Stefan Hajnoczi --- include/hw/pci/pci_ids.h| 3 + include/hw/remote/iohub.h | 42 ++ include/hw/remote/machine.h | 2 + include/hw/remote/mpqemu-link.h | 1 + include/hw/remote

[PATCH v16 17/20] multi-process: Synchronize remote memory

2021-01-10 Thread Jagannathan Raman
, the remote 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 Reviewed-by: Stefan Hajnoczi --- include/hw/remote/proxy-memory-listener.h | 28 include/hw/remote

[PATCH v19 18/20] multi-process: create IOHUB object to handle irq

2021-01-14 Thread Jagannathan Raman
Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva Reviewed-by: Stefan Hajnoczi --- include/hw/pci/pci_ids.h| 3 + include/hw/remote/iohub.h | 42 ++ include/hw/remote/machine.h | 2 + include/hw/remote/mpqemu-link.h | 1 + include/hw/remote

[PATCH v19 03/20] memory: alloc RAM from file at offset

2021-01-14 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. Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Reviewed-by: St

[PATCH v19 09/20] multi-process: define MPQemuMsg format and transmission functions

2021-01-14 Thread Jagannathan Raman
From: Elena Ufimtseva Defines MPQemuMsg, which is the message that is sent to the remote process. This message is sent over QIOChannel and is used to command the remote process to perform various tasks. Define transmission functions used by proxy and by remote. Signed-off-by: Jagannathan Raman

[PATCH v19 14/20] multi-process: add proxy communication functions

2021-01-14 Thread Jagannathan Raman
From: Elena Ufimtseva Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Reviewed-by: Stefan Hajnoczi --- include/hw/remote/mpqemu-link.h | 4 hw/remote/mpqemu-link.c | 34 ++ 2 files changed, 38

[PATCH v19 06/20] multi-process: setup a machine object for remote device process

2021-01-14 Thread Jagannathan Raman
x-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 Reviewed-by: Stefan Hajn

[PATCH v19 15/20] multi-process: Forward PCI config space acceses to the remote process

2021-01-14 Thread Jagannathan Raman
From: Elena Ufimtseva The Proxy Object sends the PCI config space accesses as messages to the remote process over the communication channel Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Reviewed-by: Stefan Hajnoczi --- include/hw/remote

[PATCH v19 04/20] multi-process: Add config option for multi-process QEMU

2021-01-14 Thread Jagannathan Raman
Add configuration options to enable or disable multiprocess QEMU code Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva Reviewed-by: Stefan Hajnoczi --- configure | 10 ++ meson.build | 4 +++- Kconfig.host | 4 hw

[PATCH v19 13/20] multi-process: introduce proxy object

2021-01-14 Thread Jagannathan Raman
From: Elena Ufimtseva Defines a PCI Device proxy object as a child of TYPE_PCI_DEVICE. Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Reviewed-by: Stefan Hajnoczi --- include/hw/remote/proxy.h | 33 hw/remote/proxy.c

[PATCH v19 08/20] io: add qio_channel_readv_full_all_eof & qio_channel_readv_full_all helpers

2021-01-14 Thread Jagannathan Raman
From: Elena Ufimtseva Adds qio_channel_readv_full_all_eof() and qio_channel_readv_full_all() to read both data and FDs. Refactors existing code to use these helpers. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- include/io/channel.h | 51

[PATCH v19 20/20] multi-process: perform device reset in the remote process

2021-01-14 Thread Jagannathan Raman
From: Elena Ufimtseva 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 Reviewed

[PATCH v19 11/20] multi-process: Associate fd of a PCIDevice with its object

2021-01-14 Thread Jagannathan Raman
Associate the file descriptor for a PCIDevice in remote process with DeviceState object. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- hw/remote/remote-obj.c | 203

[PATCH v19 19/20] multi-process: Retrieve PCI info from remote process

2021-01-14 Thread Jagannathan Raman
Retrieve PCI configuration info about the remote device and configure the Proxy PCI object based on the returned information Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- hw/remote/proxy.c | 84

[PATCH v19 10/20] multi-process: Initialize message handler in remote device

2021-01-14 Thread Jagannathan Raman
Initializes the message handler function in the remote process. It is called whenever there's an event pending on QIOChannel that registers this function. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- include/hw

[PATCH v19 00/20] Initial support for multi-process Qemu

2021-01-14 Thread Jagannathan Raman
tion of this project: Jagannathan Raman Elena Ufimtseva John G Johnson Stefan Hajnoczi Konrad Wilk Kanth Ghatraju We would like to thank the QEMU community for your feedback in the design and implementation of this project. Qemu wiki page: https://wiki.qemu.org/Features/MultiProcess

[PATCH v19 02/20] multi-process: add configure and usage information

2021-01-14 Thread Jagannathan Raman
From: Elena Ufimtseva Adds documentation explaining the command-line arguments needed to use multi-process. Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Reviewed-by: Stefan Hajnoczi --- docs/multi-process.rst | 64

[PATCH v19 12/20] multi-process: setup memory manager for remote device

2021-01-14 Thread Jagannathan Raman
SyncSysMemMsg message format is defined. It is used to send file descriptors of the RAM regions to remote device. RAM on the remote device is configured with a set of file descriptors. Old RAM regions are deleted and new regions, each with an fd, is added to the RAM. Signed-off-by: Jagannathan

[PATCH v19 07/20] io: add qio_channel_writev_full_all helper

2021-01-14 Thread Jagannathan Raman
From: Elena Ufimtseva Adds qio_channel_writev_full_all() to transmit both data and FDs. Refactors existing code to use this helper. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi Acked-by: Daniel P. Berrangé

[PATCH v19 01/20] multi-process: add the concept description to docs/devel/qemu-multiprocess

2021-01-14 Thread Jagannathan Raman
From: John G Johnson Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- docs/devel/index.rst | 1 + docs/devel/multi-process.rst | 966 +++ MAINTAINERS

[PATCH v19 05/20] multi-process: setup PCI host bridge for remote device

2021-01-14 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 Signed

[PATCH v19 17/20] multi-process: Synchronize remote memory

2021-01-14 Thread Jagannathan Raman
, the remote 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 Reviewed-by: Stefan Hajnoczi --- include/hw/remote/proxy-memory-listener.h | 28 include/hw/remote

[PATCH v19 16/20] multi-process: PCI BAR read/write handling for proxy & remote endpoints

2021-01-14 Thread Jagannathan Raman
Proxy device object implements handler for PCI BAR writes and reads. The handler uses BAR_WRITE/BAR_READ message to communicate to the remote process with the BAR address and value to be written/read. The remote process implements handler for BAR_WRITE/BAR_READ message. Signed-off-by: Jagannathan

[PATCH v20 12/20] multi-process: setup memory manager for remote device

2021-01-19 Thread Jagannathan Raman
SyncSysMemMsg message format is defined. It is used to send file descriptors of the RAM regions to remote device. RAM on the remote device is configured with a set of file descriptors. Old RAM regions are deleted and new regions, each with an fd, is added to the RAM. Signed-off-by: Jagannathan

[PATCH v20 16/20] multi-process: PCI BAR read/write handling for proxy & remote endpoints

2021-01-19 Thread Jagannathan Raman
Proxy device object implements handler for PCI BAR writes and reads. The handler uses BAR_WRITE/BAR_READ message to communicate to the remote process with the BAR address and value to be written/read. The remote process implements handler for BAR_WRITE/BAR_READ message. Signed-off-by: Jagannathan

[PATCH v20 19/20] multi-process: Retrieve PCI info from remote process

2021-01-19 Thread Jagannathan Raman
Retrieve PCI configuration info about the remote device and configure the Proxy PCI object based on the returned information Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- hw/remote/proxy.c | 84

[PATCH v20 06/20] multi-process: setup a machine object for remote device process

2021-01-19 Thread Jagannathan Raman
x-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 Reviewed-by: Stefan Hajn

[PATCH v20 03/20] memory: alloc RAM from file at offset

2021-01-19 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. Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Reviewed-by: St

[PATCH v20 15/20] multi-process: Forward PCI config space acceses to the remote process

2021-01-19 Thread Jagannathan Raman
From: Elena Ufimtseva The Proxy Object sends the PCI config space accesses as messages to the remote process over the communication channel Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Reviewed-by: Stefan Hajnoczi --- include/hw/remote

[PATCH v20 02/20] multi-process: add configure and usage information

2021-01-19 Thread Jagannathan Raman
From: Elena Ufimtseva Adds documentation explaining the command-line arguments needed to use multi-process. Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Reviewed-by: Stefan Hajnoczi --- docs/multi-process.rst | 64

[PATCH v20 20/20] multi-process: perform device reset in the remote process

2021-01-19 Thread Jagannathan Raman
From: Elena Ufimtseva 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 Reviewed

[PATCH v20 01/20] multi-process: add the concept description to docs/devel/qemu-multiprocess

2021-01-19 Thread Jagannathan Raman
From: John G Johnson Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- docs/devel/index.rst | 1 + docs/devel/multi-process.rst | 966 +++ MAINTAINERS

[PATCH v20 07/20] io: add qio_channel_writev_full_all helper

2021-01-19 Thread Jagannathan Raman
From: Elena Ufimtseva Adds qio_channel_writev_full_all() to transmit both data and FDs. Refactors existing code to use this helper. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi Acked-by: Daniel P. Berrangé

[PATCH v20 08/20] io: add qio_channel_readv_full_all_eof & qio_channel_readv_full_all helpers

2021-01-19 Thread Jagannathan Raman
From: Elena Ufimtseva Adds qio_channel_readv_full_all_eof() and qio_channel_readv_full_all() to read both data and FDs. Refactors existing code to use these helpers. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- include/io/channel.h | 53

[PATCH v20 00/20] Initial support for multi-process Qemu

2021-01-19 Thread Jagannathan Raman
devel mailing list. You can find them by following the links below ([1] - [19]). Following people contributed to the design and implementation of this project: Jagannathan Raman Elena Ufimtseva John G Johnson Stefan Hajnoczi Konrad Wilk Kanth Ghatraju We would like to thank you for your feed

[PATCH v20 13/20] multi-process: introduce proxy object

2021-01-19 Thread Jagannathan Raman
From: Elena Ufimtseva Defines a PCI Device proxy object as a child of TYPE_PCI_DEVICE. Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Reviewed-by: Stefan Hajnoczi --- include/hw/remote/proxy.h | 33 hw/remote/proxy.c

[PATCH v20 18/20] multi-process: create IOHUB object to handle irq

2021-01-19 Thread Jagannathan Raman
Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva Reviewed-by: Stefan Hajnoczi --- include/hw/pci/pci_ids.h| 3 + include/hw/remote/iohub.h | 42 ++ include/hw/remote/machine.h | 2 + include/hw/remote/mpqemu-link.h | 1 + include/hw/remote

[PATCH v20 14/20] multi-process: add proxy communication functions

2021-01-19 Thread Jagannathan Raman
From: Elena Ufimtseva Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Reviewed-by: Stefan Hajnoczi --- include/hw/remote/mpqemu-link.h | 4 hw/remote/mpqemu-link.c | 34 ++ 2 files changed, 38

[PATCH v20 09/20] multi-process: define MPQemuMsg format and transmission functions

2021-01-19 Thread Jagannathan Raman
From: Elena Ufimtseva Defines MPQemuMsg, which is the message that is sent to the remote process. This message is sent over QIOChannel and is used to command the remote process to perform various tasks. Define transmission functions used by proxy and by remote. Signed-off-by: Jagannathan Raman

[PATCH v20 05/20] multi-process: setup PCI host bridge for remote device

2021-01-19 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 Signed

[PATCH v20 04/20] multi-process: Add config option for multi-process QEMU

2021-01-19 Thread Jagannathan Raman
Add configuration options to enable or disable multiprocess QEMU code Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva Reviewed-by: Stefan Hajnoczi --- configure | 10 ++ meson.build | 4 +++- Kconfig.host | 4 hw

[PATCH v20 10/20] multi-process: Initialize message handler in remote device

2021-01-19 Thread Jagannathan Raman
Initializes the message handler function in the remote process. It is called whenever there's an event pending on QIOChannel that registers this function. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- include/hw

[PATCH v20 11/20] multi-process: Associate fd of a PCIDevice with its object

2021-01-19 Thread Jagannathan Raman
Associate the file descriptor for a PCIDevice in remote process with DeviceState object. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- hw/remote/remote-obj.c | 203

[PATCH v20 17/20] multi-process: Synchronize remote memory

2021-01-19 Thread Jagannathan Raman
, the remote 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 Reviewed-by: Stefan Hajnoczi --- include/hw/remote/proxy-memory-listener.h | 28 include/hw/remote

[PATCH v17 16/20] multi-process: PCI BAR read/write handling for proxy & remote endpoints

2021-01-13 Thread Jagannathan Raman
Proxy device object implements handler for PCI BAR writes and reads. The handler uses BAR_WRITE/BAR_READ message to communicate to the remote process with the BAR address and value to be written/read. The remote process implements handler for BAR_WRITE/BAR_READ message. Signed-off-by: Jagannathan

[PATCH v17 20/20] multi-process: perform device reset in the remote process

2021-01-13 Thread Jagannathan Raman
From: Elena Ufimtseva 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 Reviewed

[PATCH v17 17/20] multi-process: Synchronize remote memory

2021-01-13 Thread Jagannathan Raman
, the remote 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 Reviewed-by: Stefan Hajnoczi --- include/hw/remote/proxy-memory-listener.h | 28 include/hw/remote

[PATCH v17 11/20] multi-process: Associate fd of a PCIDevice with its object

2021-01-13 Thread Jagannathan Raman
Associate the file descriptor for a PCIDevice in remote process with DeviceState object. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- hw/remote/remote-obj.c | 203

[PATCH v17 01/20] multi-process: add the concept description to docs/devel/qemu-multiprocess

2021-01-13 Thread Jagannathan Raman
From: John G Johnson Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- docs/devel/index.rst | 1 + docs/devel/multi-process.rst | 966 +++ MAINTAINERS

[PATCH v17 04/20] multi-process: Add config option for multi-process QEMU

2021-01-13 Thread Jagannathan Raman
Add configuration options to enable or disable multiprocess QEMU code Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva Reviewed-by: Stefan Hajnoczi --- configure | 10 ++ meson.build | 4 +++- Kconfig.host | 4 hw

[PATCH v17 06/20] multi-process: setup a machine object for remote device process

2021-01-13 Thread Jagannathan Raman
x-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 Reviewed-by: Stefan Hajn

[PATCH v17 10/20] multi-process: Initialize message handler in remote device

2021-01-13 Thread Jagannathan Raman
Initializes the message handler function in the remote process. It is called whenever there's an event pending on QIOChannel that registers this function. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- include/hw

[PATCH v17 18/20] multi-process: create IOHUB object to handle irq

2021-01-13 Thread Jagannathan Raman
Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva Reviewed-by: Stefan Hajnoczi --- include/hw/pci/pci_ids.h| 3 + include/hw/remote/iohub.h | 42 ++ include/hw/remote/machine.h | 2 + include/hw/remote/mpqemu-link.h | 1 + include/hw/remote

[PATCH v17 05/20] multi-process: setup PCI host bridge for remote device

2021-01-13 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 Signed

[PATCH v17 14/20] multi-process: add proxy communication functions

2021-01-13 Thread Jagannathan Raman
From: Elena Ufimtseva Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Reviewed-by: Stefan Hajnoczi --- include/hw/remote/mpqemu-link.h | 4 hw/remote/mpqemu-link.c | 34 ++ 2 files changed, 38

[PATCH v17 09/20] multi-process: define MPQemuMsg format and transmission functions

2021-01-13 Thread Jagannathan Raman
From: Elena Ufimtseva Defines MPQemuMsg, which is the message that is sent to the remote process. This message is sent over QIOChannel and is used to command the remote process to perform various tasks. Define transmission functions used by proxy and by remote. Signed-off-by: Jagannathan Raman

[PATCH v17 07/20] io: add qio_channel_writev_full_all helper

2021-01-13 Thread Jagannathan Raman
From: Elena Ufimtseva Adds qio_channel_writev_full_all() to transmit both data and FDs. Refactors existing code to use this helper. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi Acked-by: Daniel P. Berrangé

[PATCH v17 12/20] multi-process: setup memory manager for remote device

2021-01-13 Thread Jagannathan Raman
SyncSysMemMsg message format is defined. It is used to send file descriptors of the RAM regions to remote device. RAM on the remote device is configured with a set of file descriptors. Old RAM regions are deleted and new regions, each with an fd, is added to the RAM. Signed-off-by: Jagannathan

[PATCH v17 19/20] multi-process: Retrieve PCI info from remote process

2021-01-13 Thread Jagannathan Raman
Retrieve PCI configuration info about the remote device and configure the Proxy PCI object based on the returned information Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- hw/remote/proxy.c | 84

[PATCH v17 02/20] multi-process: add configure and usage information

2021-01-13 Thread Jagannathan Raman
From: Elena Ufimtseva Adds documentation explaining the command-line arguments needed to use multi-process. Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Reviewed-by: Stefan Hajnoczi --- docs/multi-process.rst | 64

[PATCH v17 13/20] multi-process: introduce proxy object

2021-01-13 Thread Jagannathan Raman
From: Elena Ufimtseva Defines a PCI Device proxy object as a child of TYPE_PCI_DEVICE. Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Reviewed-by: Stefan Hajnoczi --- include/hw/remote/proxy.h | 33 hw/remote/proxy.c

<    1   2   3   4   5   6   >