Re: [PATCH v8 12/17] vfio-user: IOMMU support for remote device

2022-04-25 Thread Jag Raman
> On Apr 25, 2022, at 5:38 AM, Stefan Hajnoczi wrote: > > On Wed, Apr 20, 2022 at 11:15:16AM +0000, Jag Raman wrote: >> >> >>> On Apr 19, 2022, at 4:45 PM, Jag Raman wrote: >>> >>> Assign separate address space for each device in the

Re: [PATCH v8 13/17] vfio-user: handle DMA mappings

2022-04-25 Thread Jag Raman
> On Apr 25, 2022, at 5:56 AM, Stefan Hajnoczi wrote: > > On Tue, Apr 19, 2022 at 04:44:18PM -0400, Jagannathan Raman wrote: >> +static void dma_unregister(vfu_ctx_t *vfu_ctx, vfu_dma_info_t *info) >> +{ >> +VfuObject *o = vfu_get_private(vfu_ctx); >> +AddressSpace *dma_as = NULL; >> +

Re: [PATCH v8 14/17] vfio-user: handle PCI BAR accesses

2022-04-25 Thread Jag Raman
> On Apr 25, 2022, at 6:05 AM, Stefan Hajnoczi wrote: > > On Tue, Apr 19, 2022 at 04:44:19PM -0400, Jagannathan Raman wrote: >> +static size_t vfu_object_bar_rw(PCIDevice *pci_dev, int pci_bar, >> +hwaddr bar_offset, char * const buf, >> +

Re: [PATCH v8 15/17] vfio-user: handle device interrupts

2022-04-25 Thread Jag Raman
> On Apr 25, 2022, at 6:27 AM, Stefan Hajnoczi wrote: > > On Tue, Apr 19, 2022 at 04:44:20PM -0400, Jagannathan Raman wrote: >> +static MSIMessage vfu_object_msi_prepare_msg(PCIDevice *pci_dev, >> + unsigned int vector) >> +{ >> +MSIMessage msg; >

Re: [PATCH v8 00/17] vfio-user server in QEMU

2022-04-25 Thread Jag Raman
> On Apr 25, 2022, at 6:32 AM, Stefan Hajnoczi wrote: > > On Tue, Apr 19, 2022 at 04:44:05PM -0400, Jagannathan Raman wrote: >> This is v8 of the server side changes to enable vfio-user in QEMU. >> >> Thank you very much for reviewing the last revision of this series! > > I posted some minor

Re: [PATCH v8 13/17] vfio-user: handle DMA mappings

2022-04-26 Thread Jag Raman
> On Apr 25, 2022, at 1:34 PM, Jag Raman wrote: > > > >> On Apr 25, 2022, at 5:56 AM, Stefan Hajnoczi wrote: >> >> On Tue, Apr 19, 2022 at 04:44:18PM -0400, Jagannathan Raman wrote: >>> +static void dma_unregister(vfu_ctx_t *vfu_ctx, vfu_dma_

Re: [PATCH-for-7.0] hw/pci: Don't open-code pci_intx()

2021-12-15 Thread Jag Raman
> On Nov 16, 2021, at 12:26 PM, Philippe Mathieu-Daudé > wrote: > > Use the pci_intx() helper instead of open-coding it. > > Signed-off-by: Philippe Mathieu-Daudé > --- > Based-on: <2026170133.724751-3-fbar...@linux.ibm.com> > --- > hw/net/vmxnet3.c | 2 +- > hw/remote/iohub.c | 6 ++

Re: [PATCH v3 11/12] vfio-user: register handlers to facilitate migration

2021-12-15 Thread Jag Raman
> On Oct 27, 2021, at 2:30 PM, Stefan Hajnoczi wrote: > > On Mon, Oct 11, 2021 at 01:31:16AM -0400, Jagannathan Raman wrote: >> +static void vfu_mig_state_running(vfu_ctx_t *vfu_ctx) >> +{ >> +VfuObject *o = vfu_get_private(vfu_ctx); >> +VfuObjectClass *k = VFU_OBJECT_GET_CLASS(OBJECT(o

Re: [PATCH v5 4/5] vfio-user: Message-based DMA support

2023-10-04 Thread Jag Raman
> On Sep 20, 2023, at 4:06 AM, Mattias Nissler wrote: > > Wire up support for DMA for the case where the vfio-user client does not > provide mmap()-able file descriptors, but DMA requests must be performed > via the VFIO-user protocol. This installs an indirect memory region, > which already w

Re: [PATCH v5 5/5] vfio-user: Fix config space access byte order

2023-10-05 Thread Jag Raman
> On Sep 20, 2023, at 4:06 AM, Mattias Nissler wrote: > > PCI config space is little-endian, so on a big-endian host we need to > perform byte swaps for values as they are passed to and received from > the generic PCI config space access machinery. > > Signed-off-by: Mattias Nissler > --- >

Re: [PATCH 0/1] update maintainers list for vfio-user & multi-process QEMU

2023-06-07 Thread Jag Raman
> On Jun 7, 2023, at 12:44 PM, Stefan Hajnoczi wrote: > > On Wed, 7 Jun 2023 at 11:58, Jagannathan Raman wrote: >> >> John Johnson doesn't work at Oracle anymore. I tried to contact him to >> get his updated email address, but I haven't heard anything from him. >> >> Jagannathan Raman (1):

Re: [PATCH v6 4/5] vfio-user: Message-based DMA support

2023-11-28 Thread Jag Raman
> On Nov 1, 2023, at 9:16 AM, Mattias Nissler wrote: > > Wire up support for DMA for the case where the vfio-user client does not > provide mmap()-able file descriptors, but DMA requests must be performed > via the VFIO-user protocol. This installs an indirect memory region, > which already wo

Re: [PATCH v6 5/5] vfio-user: Fix config space access byte order

2023-11-28 Thread Jag Raman
> On Nov 1, 2023, at 9:16 AM, Mattias Nissler wrote: > > PCI config space is little-endian, so on a big-endian host we need to > perform byte swaps for values as they are passed to and received from > the generic PCI config space access machinery. > > Signed-off-by: Mattias Nissler Reviewed

Re: [PATCH v6 3/5] Update subprojects/libvfio-user

2024-01-09 Thread Jag Raman
> On Nov 1, 2023, at 9:16 AM, Mattias Nissler wrote: > > Brings in assorted bug fixes. The following are of particular interest > with respect to message-based DMA support: > > * bb308a2 "Fix address calculation for message-based DMA" > Corrects a bug in DMA address calculation. > > * 1569a3

Re: [PATCH v4 02/14] tests/avocado: Specify target VM argument to helper routines

2021-12-16 Thread Jag Raman
> On Dec 15, 2021, at 5:04 PM, Beraldo Leal wrote: > > On Wed, Dec 15, 2021 at 10:35:26AM -0500, Jagannathan Raman wrote: >> Specify target VM for exec_command and >> exec_command_and_wait_for_pattern routines >> >> Signed-off-by: Elena Ufimtseva >> Signed-off-by: John G Johnson >> Signed-o

Re: [PATCH v4 05/14] vfio-user: instantiate vfio-user context

2021-12-16 Thread Jag Raman
> On Dec 16, 2021, at 4:55 AM, Stefan Hajnoczi wrote: > > On Wed, Dec 15, 2021 at 10:35:29AM -0500, Jagannathan Raman wrote: >> +static void vfu_object_init_ctx(VfuObject *o, Error **errp) >> +{ >> +ERRP_GUARD(); >> + >> +if (o->vfu_ctx || !o->socket || !o->device || >> +!p

Re: [PATCH v4 04/14] vfio-user: define vfio-user-server object

2021-12-16 Thread Jag Raman
> On Dec 16, 2021, at 4:33 AM, Stefan Hajnoczi wrote: > > On Wed, Dec 15, 2021 at 10:35:28AM -0500, Jagannathan Raman wrote: >> diff --git a/qapi/qom.json b/qapi/qom.json >> index ccd1167808..6001a9b8f0 100644 >> --- a/qapi/qom.json >> +++ b/qapi/qom.json >> @@ -703,6 +703,20 @@ >> { 'struct':

Re: [PATCH v4 04/14] vfio-user: define vfio-user-server object

2021-12-16 Thread Jag Raman
> On Dec 16, 2021, at 4:58 AM, Stefan Hajnoczi wrote: > > On Wed, Dec 15, 2021 at 10:35:28AM -0500, Jagannathan Raman wrote: >> +static void vfu_object_set_socket(Object *obj, Visitor *v, const char *name, >> + void *opaque, Error **errp) >> +{ >> +VfuObject

Re: [PATCH v4 06/14] vfio-user: find and init PCI device

2021-12-16 Thread Jag Raman
> On Dec 16, 2021, at 5:39 AM, Stefan Hajnoczi wrote: > > On Wed, Dec 15, 2021 at 10:35:30AM -0500, Jagannathan Raman wrote: >> @@ -150,6 +157,38 @@ static void vfu_object_init_ctx(VfuObject *o, Error >> **errp) >> +o->pci_dev = PCI_DEVICE(dev); > ... >> @@ -190,6 +229,8 @@ static void vf

Re: [PATCH v4 07/14] vfio-user: run vfio-user context

2021-12-17 Thread Jag Raman
> On Dec 16, 2021, at 6:17 AM, Stefan Hajnoczi wrote: > > On Wed, Dec 15, 2021 at 10:35:31AM -0500, Jagannathan Raman wrote: >> @@ -114,6 +118,62 @@ static void vfu_object_set_device(Object *obj, const >> char *str, Error **errp) >> vfu_object_init_ctx(o, errp); >> } >> >> +static void vf

Re: [PATCH v4 09/14] vfio-user: handle DMA mappings

2021-12-17 Thread Jag Raman
> On Dec 16, 2021, at 8:24 AM, Stefan Hajnoczi wrote: > > On Wed, Dec 15, 2021 at 10:35:33AM -0500, Jagannathan Raman wrote: >> Define and register callbacks to manage the RAM regions used for >> device DMA >> >> Signed-off-by: Elena Ufimtseva >> Signed-off-by: John G Johnson >> Signed-off-b

Re: [PATCH v4 10/14] vfio-user: handle PCI BAR accesses

2021-12-17 Thread Jag Raman
> On Dec 16, 2021, at 9:10 AM, Stefan Hajnoczi wrote: > > On Wed, Dec 15, 2021 at 10:35:34AM -0500, Jagannathan Raman wrote: >> +static ssize_t vfu_object_bar_rw(PCIDevice *pci_dev, hwaddr addr, size_t >> count, >> + char * const buf, const bool is_write, >> +

Re: [PATCH v4 11/14] vfio-user: IOMMU support for remote device

2021-12-17 Thread Jag Raman
> On Dec 16, 2021, at 9:40 AM, Stefan Hajnoczi wrote: > > On Wed, Dec 15, 2021 at 10:35:35AM -0500, Jagannathan Raman wrote: >> Assign separate address space for each device in the remote processes. > > If I understand correctly this isn't really an IOMMU. It's abusing the > IOMMU APIs to crea

Re: [PATCH v4 07/14] vfio-user: run vfio-user context

2021-12-20 Thread Jag Raman
> On Dec 20, 2021, at 3:29 AM, Stefan Hajnoczi wrote: > > On Fri, Dec 17, 2021 at 05:59:48PM +0000, Jag Raman wrote: >> >> >>> On Dec 16, 2021, at 6:17 AM, Stefan Hajnoczi wrote: >>> >>> On Wed, Dec 15, 2021 at 10:35:31AM -0500, Jagannath

Re: [PATCH v4 11/14] vfio-user: IOMMU support for remote device

2021-12-20 Thread Jag Raman
> On Dec 20, 2021, at 9:36 AM, Stefan Hajnoczi wrote: > > On Fri, Dec 17, 2021 at 08:00:35PM +0000, Jag Raman wrote: >>> On Dec 16, 2021, at 9:40 AM, Stefan Hajnoczi wrote: >>> >>> On Wed, Dec 15, 2021 at 10:35:35AM -0500, Jagannathan Raman wrote: >>

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

2021-05-06 Thread Jag Raman
> On May 6, 2021, at 10:27 AM, Thomas Huth wrote: > > On 29/01/2021 17.46, Jagannathan Raman wrote: >> 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 p

Re: [PATCH 1/1] multi-process: fix usage information

2021-05-10 Thread Jag Raman
> On May 8, 2021, at 2:26 AM, Dongli Zhang wrote: > > From source code, the 'devid' of x-remote-object should be one of devices > in remote QEMU process. > > Signed-off-by: Dongli Zhang Reviewed-by: Jagannathan Raman > --- > I have verified by reading the code and playing with below orche

[Qemu-devel] QEMU migration cancellation

2017-10-11 Thread Jag Raman
Hi, I'd like to check about the behavior of a QEMU instance when live migration is cancelled. If the migration of a guest OS from source QEMU instance to destination instance is cancelled, the destination instance exits with a failure code. Could you please explain why this design decision was t

Re: [PATCH v5 00/50] Initial support for multi-process qemu

2020-03-02 Thread Jag Raman
On 3/1/2020 6:57 AM, Alex Bennée wrote: Jagannathan Raman writes: Hello Started with the presentation in October 2017 made by Marc-Andre (Red Hat) and Konrad Wilk (Oracle) [1], and continued by Jag's BoF at KVM Forum 2018, the multi-process project is now available and presented in th

Re: [PATCH v5 00/50] Initial support for multi-process qemu

2020-03-02 Thread Jag Raman
On 3/2/2020 11:29 AM, Alex Bennée wrote: Jag Raman writes: On 3/1/2020 6:57 AM, Alex Bennée wrote: Jagannathan Raman writes: Hello Started with the presentation in October 2017 made by Marc-Andre (Red Hat) and Konrad Wilk (Oracle) [1], and continued by Jag's BoF at KVM Forum

Re: [PATCH v5 47/50] multi-process: Enable support for multiple devices in remote

2020-03-02 Thread Jag Raman
On 2/28/2020 11:44 AM, Stefan Hajnoczi wrote: On Mon, Feb 24, 2020 at 03:55:38PM -0500, Jagannathan Raman wrote: From: Elena Ufimtseva Add support to allow multiple devices to be configured in the remote process This patch allows multiple devices to be addressed over a single UNIX domain

Re: [PATCH v5 01/50] multi-process: memory: alloc RAM from file at offset

2020-03-04 Thread Jag Raman
On 3/3/2020 2:51 PM, Dr. David Alan Gilbert wrote: * Jagannathan Raman (jag.ra...@oracle.com) wrote: 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 ne

Re: [PATCH v5 08/50] multi-process: add functions to synchronize proxy and remote endpoints

2020-03-04 Thread Jag Raman
On 3/3/2020 2:56 PM, Dr. David Alan Gilbert wrote: * Jagannathan Raman (jag.ra...@oracle.com) wrote: 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

Re: [PATCH v5 12/50] multi-process: remote process initialization

2020-03-04 Thread Jag Raman
On 3/4/2020 5:29 AM, Dr. David Alan Gilbert wrote: * Jagannathan Raman (jag.ra...@oracle.com) wrote: 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

Re: [PATCH v5 15/50] multi-process: PCI BAR read/write handling for proxy & remote endpoints

2020-03-04 Thread Jag Raman
On 3/4/2020 5:47 AM, Dr. David Alan Gilbert wrote: * Jagannathan Raman (jag.ra...@oracle.com) wrote: 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 writ

Re: [PATCH v5 16/50] multi-process: Synchronize remote memory

2020-03-04 Thread Jag Raman
On 3/4/2020 6:53 AM, Dr. David Alan Gilbert wrote: * Jagannathan Raman (jag.ra...@oracle.com) wrote: Add memory-listener object which is used to keep the view of the RAM in sync between QEMU and remote process. A MemoryListener is registered for system-memory AddressSpace. The listener sends

Re: [PATCH v5 40/50] multi-process/mig: build migration module in the remote process

2020-03-04 Thread Jag Raman
On 3/4/2020 10:58 AM, Dr. David Alan Gilbert wrote: * Jagannathan Raman (jag.ra...@oracle.com) wrote: 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 --- Makefile.objs | 4

Re: [PATCH v5 40/50] multi-process/mig: build migration module in the remote process

2020-03-04 Thread Jag Raman
On 3/4/2020 2:52 PM, Dr. David Alan Gilbert wrote: * Jag Raman (jag.ra...@oracle.com) wrote: On 3/4/2020 10:58 AM, Dr. David Alan Gilbert wrote: * Jagannathan Raman (jag.ra...@oracle.com) wrote: Add Makefile support to enable migration in remote process Signed-off-by: Elena Ufimtseva

Re: [PATCH v5 34/50] multi-process/mon: choose HMP commands based on target

2020-03-05 Thread Jag Raman
On 3/5/2020 5:39 AM, Dr. David Alan Gilbert wrote: * Jagannathan Raman (jag.ra...@oracle.com) wrote: 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 John

Re: [PATCH v5 37/50] multi-process/mon: Refactor monitor/chardev functions out of vl.c

2020-03-05 Thread Jag Raman
On 3/5/2020 5:51 AM, Dr. David Alan Gilbert wrote: * Jagannathan Raman (jag.ra...@oracle.com) wrote: Some of the initialization helper functions w.r.t monitor & chardev in vl.c are also used by the remote process. Therefore, these functions are refactored into shared files that both QEMU & re

Re: [PATCH v5 36/50] multi-process/mon: enable QMP module support in the remote process

2020-03-05 Thread Jag Raman
On 3/5/2020 5:43 AM, Dr. David Alan Gilbert wrote: * Jagannathan Raman (jag.ra...@oracle.com) wrote: 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 It's odd that this is labell

Re: [PATCH v5 41/50] multi-process/mig: Enable VMSD save in the Proxy object

2020-03-05 Thread Jag Raman
On 3/5/2020 7:31 AM, Dr. David Alan Gilbert wrote: * Jagannathan Raman (jag.ra...@oracle.com) wrote: 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: Jagannat

Re: [PATCH v5 32/50] multi-process: Use separate MMIO communication channel

2020-03-10 Thread Jag Raman
On 3/6/2020 11:52 AM, Stefan Hajnoczi wrote: This went unanswered in the last revision: On Thu, Nov 21, 2019 at 12:31:42PM +, Stefan Hajnoczi wrote: On Wed, Nov 13, 2019 at 11:14:50AM -0500, Jag Raman wrote: On 11/11/2019 11:21 AM, Stefan Hajnoczi wrote: On Thu, Oct 24, 2019 at 05:09

Re: [PATCH RESEND v6 06/36] monitor: destaticize HMP commands

2020-04-23 Thread Jag Raman
> On Apr 23, 2020, at 10:14 AM, Philippe Mathieu-Daudé > wrote: > > Why 'destaticize HMP commands’? Hi Philippe, Both QEMU & the remote process links the QMP code. QEMU uses all of the QMP commands, whereas, the remote process only uses a subset of this. Therefore, the ‘static’ functions wh

Re: [PATCH RESEND v6 36/36] multi-process: add configure and usage information

2020-04-23 Thread Jag Raman
> On Apr 23, 2020, at 9:54 AM, 罗勇刚(Yonggang Luo) wrote: > > Does multi-process support on Windows? > I found it use mmap and unix socket for inter-process communication, that may > not support under Windows. Hi Yonggang, We have only tested this on Linux till now. Are you using QEMU with Wi

Re: [PATCH 5/7] chardev: Extract system emulation specific code

2020-04-24 Thread Jag Raman
> On Apr 23, 2020, at 4:21 PM, Philippe Mathieu-Daudé wrote: > > Split out code only used during system emulation, > to reduce code pulled in user emulation and tools. > > Signed-off-by: Philippe Mathieu-Daudé > --- > chardev/chardev-internal.h | 3 ++ > chardev/char.c | 35 +

Re: [PATCH RESEND v6 08/36] multi-process: Add stub functions to facilitate build of multi-process

2020-04-24 Thread Jag Raman
> On Apr 24, 2020, at 9:12 AM, Stefan Hajnoczi wrote: > > On Wed, Apr 22, 2020 at 09:13:43PM -0700, elena.ufimts...@oracle.com wrote: >> diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs >> index f884bb6180..f74c7e927b 100644 >> --- a/stubs/Makefile.objs >> +++ b/stubs/Makefile.objs >> @@

Re: [PATCH RESEND v6 08/36] multi-process: Add stub functions to facilitate build of multi-process

2020-04-28 Thread Jag Raman
> On Apr 28, 2020, at 12:29 PM, Stefan Hajnoczi wrote: > > On Fri, Apr 24, 2020 at 09:47:56AM -0400, Jag Raman wrote: >>> On Apr 24, 2020, at 9:12 AM, Stefan Hajnoczi wrote: >>> On Wed, Apr 22, 2020 at 09:13:43PM -0700, elena.ufimts...@oracle.com wrote: >>&g

Re: [PATCH v7 00/21] Initial support for multi-process qemu

2020-07-09 Thread Jag Raman
> On Jul 2, 2020, at 9:40 AM, Stefan Hajnoczi wrote: > > On Sat, Jun 27, 2020 at 10:09:22AM -0700, elena.ufimts...@oracle.com wrote: >> From: Elena Ufimtseva >> >> This is the v7 of the patchset. > > I have completed the review and left comments on the patches. > > I'm glad it was possible

Re: [PATCH v7 03/21] multi-process: setup PCI host bridge for remote device

2020-07-09 Thread Jag Raman
> On Jun 30, 2020, at 11:17 AM, Stefan Hajnoczi wrote: > > On Sat, Jun 27, 2020 at 10:09:25AM -0700, elena.ufimts...@oracle.com wrote: >> diff --git a/hw/pci-host/remote.c b/hw/pci-host/remote.c >> new file mode 100644 >> index 00..5ea9af4154 >> --- /dev/null >> +++ b/hw/pci-host/remot

Re: [PATCH v7 12/21] multi-process: Connect Proxy Object with device in the remote process

2020-07-24 Thread Jag Raman
> On Jul 1, 2020, at 5:20 AM, Stefan Hajnoczi wrote: > > On Sat, Jun 27, 2020 at 10:09:34AM -0700, elena.ufimts...@oracle.com wrote: >> From: Jagannathan Raman >> >> Send a message to the remote process to connect PCI device with the >> corresponding Proxy object in QEMU > > I thought the p

Re: [PATCH v7 12/21] multi-process: Connect Proxy Object with device in the remote process

2020-07-31 Thread Jag Raman
> On Jul 27, 2020, at 9:18 AM, Stefan Hajnoczi wrote: > > On Fri, Jul 24, 2020 at 12:57:22PM -0400, Jag Raman wrote: >>> On Jul 1, 2020, at 5:20 AM, Stefan Hajnoczi wrote: >>> On Sat, Jun 27, 2020 at 10:09:34AM -0700, elena.ufimts...@oracle.com wrote: >>

Re: [PATCH] multi-process: Initialize variables declared with g_auto*

2021-03-03 Thread Jag Raman
> On Mar 3, 2021, at 2:06 AM, Zenghui Yu wrote: > > Quote docs/devel/style.rst (section "Automatic memory deallocation"): > > * Variables declared with g_auto* MUST always be initialized, > otherwise the cleanup function will use uninitialized stack memory > > Initialize @name properly to g

Re: [PATCH] multi-process: Initialize variables declared with g_auto*

2021-03-03 Thread Jag Raman
> On Mar 3, 2021, at 5:17 AM, Daniel P. Berrangé wrote: > > On Wed, Mar 03, 2021 at 03:06:39PM +0800, Zenghui Yu wrote: >> Quote docs/devel/style.rst (section "Automatic memory deallocation"): >> >> * Variables declared with g_auto* MUST always be initialized, >> otherwise the cleanup functio

Re: [PATCH] multi-process: Initialize variables declared with g_auto*

2021-03-03 Thread Jag Raman
> On Mar 3, 2021, at 9:26 AM, Daniel P. Berrangé wrote: > > On Wed, Mar 03, 2021 at 02:24:04PM +0000, Jag Raman wrote: >> >> >>> On Mar 3, 2021, at 5:17 AM, Daniel P. Berrangé wrote: >>> >>> On Wed, Mar 03, 2021 at 03:06:39PM +0800, Z

Re: [PATCH] multiprocess: move feature to meson_options.txt

2021-02-25 Thread Jag Raman
> On Feb 25, 2021, at 11:35 AM, Stefan Hajnoczi wrote: > > On Thu, Feb 25, 2021 at 01:15:53PM +0100, Paolo Bonzini wrote: >> On 25/02/21 11:38, Philippe Mathieu-Daudé wrote: >>> On 2/24/21 1:23 PM, Paolo Bonzini wrote: Signed-off-by: Paolo Bonzini --- configure | 12 +++

Re: [PATCH 0/3] docs: replace master/slave with more accurate wording

2021-02-26 Thread Jag Raman
> On Feb 26, 2021, at 9:34 AM, Paolo Bonzini wrote: > > Usually front-end/back-end are used for the two vhost sides rather than > master/slave. Use them in the documentation as they identify more > clearly what is going on (plus, the documentation was sometimes using > client/server instead).

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

2021-01-21 Thread Jag Raman
> On Jan 21, 2021, at 12:07 PM, Stefan Hajnoczi wrote: > > On Tue, Jan 19, 2021 at 03:28:17PM -0500, Jagannathan Raman wrote: >> Hi, >> >> This is the v20 of the patchset. This version has the following changes: >> >> [PATCH v18 08/20] io: add qio_channel_readv_full_all_eof & >>

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

2021-01-27 Thread Jag Raman
Hi Cedric, > On Jan 25, 2021, at 11:57 AM, Cédric Le Goater wrote: > > Hello, > > Thanks for this patchset. I have a slightly "off topic" question > but I don't want to distract the maintainers from merging any of > this. Feel free to ignore. > > I understand that this framework is targetti

Re: [PULL v3 00/27] Block patches

2021-02-08 Thread Jag Raman
> On Feb 8, 2021, at 5:02 AM, Philippe Mathieu-Daudé wrote: > > On 2/8/21 10:27 AM, Stefan Hajnoczi wrote: >> On Sat, Feb 06, 2021 at 05:03:20PM +, Peter Maydell wrote: >>> On Fri, 5 Feb 2021 at 22:53, Peter Maydell wrote: On Fri, 5 Feb 2021 at 16:45, Stefan Hajnoczi wrote: >>>

Re: [PULL v3 00/27] Block patches

2021-02-09 Thread Jag Raman
> On Feb 9, 2021, at 1:03 AM, Thomas Huth wrote: > > On 08/02/2021 21.21, Stefan Hajnoczi wrote: >> On Mon, Feb 08, 2021 at 11:02:57AM +0100, Philippe Mathieu-Daudé wrote: >>> On 2/8/21 10:27 AM, Stefan Hajnoczi wrote: On Sat, Feb 06, 2021 at 05:03:20PM +, Peter Maydell wrote: > On

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

2020-12-09 Thread Jag Raman
> On Dec 4, 2020, at 9:37 AM, Daniel P. Berrangé wrote: > > On Tue, Dec 01, 2020 at 03:22:37PM -0500, Jagannathan Raman wrote: >> From: Elena Ufimtseva >> >> Adds documentation explaining the command-line arguments needed >> to use multi-process. Also adds a python script that illustrates th

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

2020-12-09 Thread Jag Raman
> On Dec 8, 2020, at 8:57 AM, Marc-André Lureau > wrote: > > Hi > > On Wed, Dec 2, 2020 at 12:23 AM Jagannathan Raman > wrote: > Add memory-listener object which is used to keep the view of the RAM > in sync between QEMU and remote process. > A MemoryListener is registered for system-memor

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

2020-12-09 Thread Jag Raman
> On Dec 4, 2020, at 9:35 AM, Marc-André Lureau > wrote: > > > > On Wed, Dec 2, 2020 at 12:23 AM Jagannathan Raman > wrote: > 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

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

2020-12-10 Thread Jag Raman
> On Dec 9, 2020, at 4:28 PM, Marc-André Lureau > wrote: > > > > On Wed, Dec 9, 2020 at 8:20 PM Jag Raman wrote: > > > > On Dec 8, 2020, at 8:57 AM, Marc-André Lureau > > wrote: > > > > Hi > > > > On Wed, Dec 2, 2020 at 12:

Re: [PULL v4 14/27] io: add qio_channel_readv_full_all_eof & qio_channel_readv_full_all helpers

2021-02-11 Thread Jag Raman
> On Feb 11, 2021, at 10:46 AM, Daniel P. Berrangé wrote: > > On Thu, Feb 11, 2021 at 04:34:40PM +0100, Max Reitz wrote: >> On 10.02.21 10:26, Stefan Hajnoczi wrote: >>> From: Elena Ufimtseva >>> >>> Adds qio_channel_readv_full_all_eof() and qio_channel_readv_full_all() >>> to read both data

Re: [PATCH] io: error_prepend() in qio_channel_readv_full_all() causes segfault

2021-02-12 Thread Jag Raman
> On Feb 12, 2021, at 6:16 AM, Daniel P. Berrangé wrote: > > On Fri, Feb 12, 2021 at 06:16:07AM -0500, Jagannathan Raman wrote: >> Using error_prepend() in qio_channel_readv_full_all() causes a segfault >> as errp is not set when ret is 0. This results in the failure of iotest >> 83. Replacing

libvfio-user library in QEMU

2021-02-12 Thread Jag Raman
Hi Stefan, If we have to use libvfio-user library in QEMU, could we link the library with the QEMU binary based on some config options? Secondly, the remote process in multi-process QEMU uses the same QEMU binary for the remote process as well. Is this OK with libvfio-user, to start with? Or d

Re: [PATCH] io: error_prepend() in qio_channel_readv_full_all() causes segfault

2021-02-12 Thread Jag Raman
> On Feb 12, 2021, at 8:08 AM, Eric Blake wrote: > > On 2/12/21 5:41 AM, Jag Raman wrote: >> >> >>> On Feb 12, 2021, at 6:16 AM, Daniel P. Berrangé wrote: >>> >>> On Fri, Feb 12, 2021 at 06:16:07AM -0500, Jagannathan Raman wrote: >>

Re: [PATCH v13 00/19] Initial support for multi-process Qemu

2020-12-14 Thread Jag Raman
Hi, In this series, we have incorporated the changes Marc-Andre proposed to improve the code in v12. Following is a changelog that outlines the differences between v12 and v13. CHANGELOG: [PATCH v13 02/19] multi-process: add configure and usage information - Dropped “tests

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

2020-12-16 Thread Jag Raman
> On Dec 16, 2020, at 8:43 AM, Marc-André Lureau > wrote: > > > > On Mon, Dec 14, 2020 at 9:15 AM Jagannathan Raman > wrote: > Associate the file descriptor for a PCIDevice in remote process with > DeviceState object. > > Signed-off-by: Elena Ufimtseva > Signed-off-by: John G Johnson >

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

2020-12-16 Thread Jag Raman
> On Dec 16, 2020, at 12:34 PM, Marc-André Lureau > wrote: > > Hi > > On Wed, Dec 16, 2020 at 9:06 PM Jag Raman wrote: > > > > On Dec 16, 2020, at 8:43 AM, Marc-André Lureau > > wrote: > > > > > > > > On Mon, Dec 14, 2020

Re: [PATCH v15 08/20] multi-process: add qio channel read function

2020-12-23 Thread Jag Raman
> On Dec 23, 2020, at 6:24 AM, Marc-André Lureau > wrote: > > Hi > > On Wed, Dec 23, 2020 at 10:17 AM wrote: > From: Elena Ufimtseva > > Adds qio_channel_readv_full_all() to read both data and FDs. > Refactors existing code to use this function. > > Signed-off-by: Elena Ufimtseva > Sign

Re: [PATCH] multi-process: Acceptance test for multiprocess QEMU

2020-12-29 Thread Jag Raman
> On Dec 23, 2020, at 1:49 PM, Elena Ufimtseva > wrote: > > On Wed, Dec 23, 2020 at 03:01:24PM +0400, Marc-André Lureau wrote: >> Hi >> >> On Wed, Dec 23, 2020 at 10:45 AM wrote: >> >>> From: Jagannathan Raman >>> >>> Runs the Avocado acceptance test to check if a >>> remote lsi53c895a d

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

2021-01-13 Thread Jag Raman
> On Jan 11, 2021, at 3:13 PM, 罗勇刚(Yonggang Luo) wrote: > > > > On Tue, Jan 12, 2021 at 2:02 AM Jag Raman wrote: > > > > > > > > > On Jan 11, 2021, at 12:20 AM, 罗勇刚(Yonggang Luo) > > > wrote: > > > > > > I have a ques

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

2021-01-14 Thread Jag Raman
> On Jan 14, 2021, at 8:49 AM, Stefan Hajnoczi wrote: > > On Wed, Jan 13, 2021 at 03:53:27PM -0500, Jagannathan Raman wrote: >> while (nlocal_iov > 0) { >> ssize_t len; >> -len = qio_channel_readv(ioc, local_iov, nlocal_iov, errp); >> +len = qio_channel_readv_full(i

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

2021-01-14 Thread Jag Raman
> On Jan 14, 2021, at 11:27 AM, Stefan Hajnoczi wrote: > > On Thu, Jan 14, 2021 at 10:40:03AM -0500, Jagannathan Raman wrote: >> +int qio_channel_readv_full_all(QIOChannel *ioc, >> + const struct iovec *iov, >> + size_t niov, >> +

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

2021-01-14 Thread Jag Raman
> On Jan 14, 2021, at 1:00 PM, Daniel P. Berrangé wrote: > > On Thu, Jan 14, 2021 at 12:55:58PM -0500, Jag Raman wrote: >> >> >>> On Jan 14, 2021, at 11:27 AM, Stefan Hajnoczi wrote: >>> >>> On Thu, Jan 14, 2021 at 10:4

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

2021-01-15 Thread Jag Raman
> On Jan 15, 2021, at 4:20 AM, Stefan Hajnoczi wrote: > > On Thu, Jan 14, 2021 at 01:24:37PM -0500, Jag Raman wrote: >> >> >>> On Jan 14, 2021, at 1:00 PM, Daniel P. Berrangé wrote: >>> >>> On Thu, Jan 14, 2021 at 12:55:58PM -0500, Jag Raman

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

2021-01-15 Thread Jag Raman
> On Jan 15, 2021, at 4:20 AM, Stefan Hajnoczi wrote: > > On Thu, Jan 14, 2021 at 01:24:37PM -0500, Jag Raman wrote: >> >> >>> On Jan 14, 2021, at 1:00 PM, Daniel P. Berrangé wrote: >>> >>> On Thu, Jan 14, 2021 at 12:55:58PM -0500, Jag Raman

Re: [Qemu-devel] [RFC PATCH v2 01/35] multi-process: memory: alloc RAM from file at offset

2019-09-03 Thread Jag Raman
On 6/18/2019 1:12 AM, Gerd Hoffmann wrote: On Mon, Jun 17, 2019 at 11:14:59AM -0700, elena.ufimts...@oracle.com wrote: From: 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 be

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

2019-09-04 Thread Jag Raman
On 9/4/2019 5:18 AM, Daniel P. Berrangé wrote: On Tue, Sep 03, 2019 at 04:37:26PM -0400, Jagannathan Raman wrote: Started with the presentation in October 2017 made by Marc-Andre (Red Hat) and Konrad Wilk (Oracle) [1], and continued by Jag's BoF at KVM Forum 2018, the multi-process project is

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

2019-09-05 Thread Jag Raman
On 9/4/2019 4:11 AM, Dr. David Alan Gilbert wrote: * Jagannathan Raman (jag.ra...@oracle.com) wrote: 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 ne

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

2019-09-05 Thread Jag Raman
On 9/4/2019 5:11 AM, Daniel P. Berrangé wrote: On Tue, Sep 03, 2019 at 04:37:28PM -0400, Jagannathan Raman wrote: qemu_thread_cancel() added to destroy a given running thread. This will be needed in the following patches. I don't see anything in the following patches that actually uses this

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

2019-09-05 Thread Jag Raman
On 9/5/2019 10:37 AM, Eric Blake wrote: On 9/4/19 3:22 AM, Daniel P. Berrangé wrote: On Tue, Sep 03, 2019 at 04:37:33PM -0400, Jagannathan Raman wrote: Defines proxy-link object which forms the communication link between QEMU & emulation program. Adds functions to configure members of proxy-

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

2019-09-05 Thread Jag Raman
On 9/4/2019 4:37 AM, Dr. David Alan Gilbert wrote: * Jagannathan Raman (jag.ra...@oracle.com) wrote: Some of the initialization helper functions w.r.t monitor & chardev in vl.c are also used by the remote process. Therefore, these functions are refactored into a shared file that both QEMU & r

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

2019-09-05 Thread Jag Raman
On 9/5/2019 6:22 AM, Gerd Hoffmann wrote: Hi, +static uint64_t proxy_lsi_io_read(void *opaque, hwaddr addr, unsigned size) +{ +ProxyLSIState *s = opaque; + +return proxy_default_bar_read(PCI_PROXY_DEV(s), &s->io_io, addr, size, + false); +} + +stat

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

2019-09-05 Thread Jag Raman
On 9/4/2019 4:56 AM, Dr. David Alan Gilbert wrote: * Jagannathan Raman (jag.ra...@oracle.com) wrote: 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

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

2019-02-10 Thread Jag Raman
ping > On Feb 5, 2019, at 5:50 PM, Jagannathan Raman wrote: > > 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 Rama

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

2019-10-10 Thread Jag Raman
On 10/9/2019 1:58 PM, Elena Ufimtseva wrote: On Wed, Oct 09, 2019 at 02:37:24PM +0100, Stefan Hajnoczi wrote: On Thu, Sep 12, 2019 at 05:34:35PM +0200, Stefan Hajnoczi wrote: On Tue, Sep 03, 2019 at 04:37:33PM -0400, Jagannathan Raman wrote: +msg->num_fds = 0; +for (chdr = CMSG_FIRS

Re: [RFC v4 PATCH 49/49] multi-process: add configure and usage information

2019-11-07 Thread Jag Raman
On 11/7/2019 9:39 AM, Daniel P. Berrangé wrote: On Thu, Nov 07, 2019 at 03:02:20PM +0100, Stefan Hajnoczi wrote: On Thu, Oct 24, 2019 at 05:09:30AM -0400, Jagannathan Raman wrote: From: Elena Ufimtseva Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G

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

2019-11-13 Thread Jag Raman
On 11/13/2019 10:30 AM, Stefan Hajnoczi wrote: On Thu, Oct 24, 2019 at 05:08:43AM -0400, Jagannathan Raman wrote: 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 Signe

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

2019-11-13 Thread Jag Raman
On 11/11/2019 11:41 AM, Stefan Hajnoczi wrote: On Thu, Oct 24, 2019 at 05:08:48AM -0400, Jagannathan Raman wrote: +int mpqemu_msg_recv(MPQemuLinkState *s, MPQemuMsg *msg, MPQemuChannel *chan) +{ +int rc; +uint8_t *data; +union { +char control[CMSG_SPACE(REMOTE_MAX_FDS * si

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

2019-11-13 Thread Jag Raman
On 11/11/2019 11:27 AM, Stefan Hajnoczi wrote: On Thu, Oct 24, 2019 at 05:09:11AM -0400, Jagannathan Raman wrote: +static void broadcast_msg(MPQemuMsg *msg, bool need_reply) +{ +PCIProxyDev *entry; +unsigned int pid; +int wait; + +QLIST_FOREACH(entry, &proxy_dev_list.devices,

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

2019-11-13 Thread Jag Raman
On 11/13/2019 10:51 AM, Daniel P. Berrangé wrote: On Wed, Nov 13, 2019 at 10:38:06AM -0500, Jag Raman wrote: On 11/13/2019 10:30 AM, Stefan Hajnoczi wrote: On Thu, Oct 24, 2019 at 05:08:43AM -0400, Jagannathan Raman wrote: qemu_thread_cancel() added to destroy a given running thread

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

2019-11-13 Thread Jag Raman
On 11/11/2019 11:21 AM, Stefan Hajnoczi wrote: On Thu, Oct 24, 2019 at 05:09:13AM -0400, Jagannathan Raman wrote: Using a separate communication channel for MMIO helps with improving Performance Why? Typical initiation of IO operations involves multiple MMIO accesses per IO operation. In

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

2019-11-13 Thread Jag Raman
On 11/11/2019 11:19 AM, Stefan Hajnoczi wrote: On Thu, Oct 24, 2019 at 05:09:14AM -0400, Jagannathan Raman wrote: +void proxy_device_reset(DeviceState *dev) +{ +PCIProxyDev *pdev = PCI_PROXY_DEV(dev); +MPQemuMsg msg; + +memset(&msg, 0, sizeof(MPQemuMsg)); + +msg.bytestream = 0

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

2019-11-13 Thread Jag Raman
On 11/11/2019 11:15 AM, Stefan Hajnoczi wrote: On Thu, Oct 24, 2019 at 05:09:28AM -0400, Jagannathan Raman wrote: @@ -93,7 +94,8 @@ static void process_config_write(MPQemuMsg *msg) struct conf_data_msg *conf = (struct conf_data_msg *)msg->data2; qemu_mutex_lock_iothread(); -

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

2019-11-13 Thread Jag Raman
On 11/11/2019 11:17 AM, Stefan Hajnoczi wrote: On Thu, Oct 24, 2019 at 05:09:26AM -0400, Jagannathan Raman wrote: @@ -656,6 +657,19 @@ static void init_proxy(PCIDevice *dev, char *command, bool need_spawn, Error **e } } +static void proxy_vm_state_change(void *opaque, int running,

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

2019-11-13 Thread Jag Raman
On 11/13/2019 11:33 AM, Stefan Hajnoczi wrote: On Thu, Oct 24, 2019 at 05:08:52AM -0400, Jagannathan Raman wrote: +static void remote_ram_destructor(MemoryRegion *mr) +{ +qemu_ram_free(mr->ram_block); +} + +static void remote_ram_init_from_fd(MemoryRegion *mr, int fd, uint64_t size, +

<    1   2   3   >