Re: [PATCH] softmmu: Support concurrent bounce buffers

2024-09-25 Thread Mattias Nissler
On Wed, Sep 25, 2024 at 12:03 PM Michael Tokarev wrote: > > 19.08.2024 16:54, Mattias Nissler wrote: > > When DMA memory can't be directly accessed, as is the case when > > running the device model in a separate process without shareable DMA > > file descript

Re: [PATCH] mac_dbdma: Remove leftover `dma_memory_unmap` calls

2024-09-16 Thread Mattias Nissler
> On 16/09/2024 18:57, Mattias Nissler wrote: > > > These were passing a NULL buffer pointer unconditionally, which happens > > to behave in a mostly benign way (except for the chance of an excess > > memory region unref and a bounce buffer leak). Per the function comment

[PATCH] mac_dbdma: Remove leftover `dma_memory_unmap` calls

2024-09-16 Thread Mattias Nissler
"softmmu: Support concurrent bounce buffers" change. Given that the code in question never sets up any mappings, just remove the unnecessary dma_memory_unmap calls along with the DBDMA_io struct fields that are now entirely unused. Signed-off-by: Mattias Nissler --- hw/ide/macio.c

Re: [PULL 1/9] softmmu: Support concurrent bounce buffers

2024-09-16 Thread Mattias Nissler
On Mon, Sep 16, 2024 at 3:06 PM Cédric Le Goater wrote: > > On 9/16/24 14:41, Mattias Nissler wrote: > > Thanks Cédric, I can reproduce now, and my proposed patch fixes avoids > > the crash as expected. > disk images for macos9 and macosx10 all boot. Thanks for testing, happ

Re: [PULL 1/9] softmmu: Support concurrent bounce buffers

2024-09-16 Thread Mattias Nissler
On Mon, Sep 16, 2024 at 2:28 PM Peter Maydell wrote: > > On Mon, 16 Sept 2024 at 13:14, Mark Cave-Ayland > wrote: > > > > On 16/09/2024 12:44, Peter Maydell wrote: > > > > > On Mon, 16 Sept 2024 at 12:29, Mark Cave-Ayland > > > wrote: > > >> I'm fairly sure that this patch would break MacOS 9 wh

Re: [PULL 1/9] softmmu: Support concurrent bounce buffers

2024-09-16 Thread Mattias Nissler
Thanks Cédric, I can reproduce now, and my proposed patch fixes avoids the crash as expected. On Mon, Sep 16, 2024 at 2:28 PM Cédric Le Goater wrote: > > Mattias, > > > > Cédric, can you try with the above patch and/or > > > > crash seems gone. > > > >> share more details of your setup so I can v

Re: [PATCH] softmmu: Support concurrent bounce buffers

2024-09-16 Thread Mattias Nissler
On Mon, Sep 16, 2024 at 11:05 AM Peter Maydell wrote: > > On Mon, 16 Sept 2024 at 08:35, Mattias Nissler wrote: > > > > On Fri, Sep 13, 2024 at 6:47 PM Peter Maydell > > wrote: > > > > > > On Fri, 13 Sept 2024 at 16:55, Peter Xu wrote: > > >

Re: [PULL 1/9] softmmu: Support concurrent bounce buffers

2024-09-16 Thread Mattias Nissler
Thanks for the report, and my apologies for the breakage. On Fri, Sep 13, 2024 at 4:47 PM Peter Xu wrote: > > On Fri, Sep 13, 2024 at 04:35:32PM +0200, Cédric Le Goater wrote: > > Hello, > > > > +Mark (for the Mac devices) > > > > On 9/9/24 22:11, Peter X

Re: [PATCH] softmmu: Support concurrent bounce buffers

2024-09-16 Thread Mattias Nissler
On Fri, Sep 13, 2024 at 6:47 PM Peter Maydell wrote: > > On Fri, 13 Sept 2024 at 16:55, Peter Xu wrote: > > > > On Thu, Sep 12, 2024 at 03:27:55PM +0100, Peter Maydell wrote: > > > Coverity is pretty unhappy about this trick, because it isn't able > > > to recognise that we can figure out the add

Re: [PATCH] softmmu: Support concurrent bounce buffers

2024-09-11 Thread Mattias Nissler
On Wed, Sep 11, 2024 at 12:24 PM Michael S. Tsirkin wrote: > > On Tue, Sep 10, 2024 at 11:36:08PM +0200, Mattias Nissler wrote: > > On Tue, Sep 10, 2024 at 6:40 PM Michael S. Tsirkin wrote: > > > > > > On Tue, Sep 10, 2024 at 06:10:50PM +0200, Mattias Nissler wrote

Re: [PATCH] softmmu: Support concurrent bounce buffers

2024-09-10 Thread Mattias Nissler
On Tue, Sep 10, 2024 at 6:40 PM Michael S. Tsirkin wrote: > > On Tue, Sep 10, 2024 at 06:10:50PM +0200, Mattias Nissler wrote: > > On Tue, Sep 10, 2024 at 5:44 PM Peter Maydell > > wrote: > > > > > > On Tue, 10 Sept 2024 at 15:53, Michael S. Tsirkin wrote:

[PATCH] softmmu: Expand comments describing max_bounce_buffer_size

2024-09-10 Thread Mattias Nissler
Clarify how the parameter gets configured and how it is used when servicing DMA mapping requests targeting indirect memory regions. Signed-off-by: Mattias Nissler --- include/exec/memory.h | 9 - include/hw/pci/pci_device.h | 6 +- 2 files changed, 13 insertions(+), 2

Re: [PATCH] softmmu: Support concurrent bounce buffers

2024-09-10 Thread Mattias Nissler
On Tue, Sep 10, 2024 at 5:44 PM Peter Maydell wrote: > > On Tue, 10 Sept 2024 at 15:53, Michael S. Tsirkin wrote: > > > > On Mon, Aug 19, 2024 at 06:54:54AM -0700, Mattias Nissler wrote: > > > When DMA memory can't be directly accessed, as is the case when >

[PATCH v12 2/3] vfio-user: Message-based DMA support

2024-08-27 Thread Mattias Nissler
ed-by: Jagannathan Raman Signed-off-by: Mattias Nissler --- hw/remote/trace-events| 2 + hw/remote/vfio-user-obj.c | 100 -- 2 files changed, 87 insertions(+), 15 deletions(-) diff --git a/hw/remote/trace-events b/hw/remote/trace-events index 0d1b7d56a5..358a6

[PATCH v12 1/3] Update subprojects/libvfio-user

2024-08-27 Thread Mattias Nissler
ocket pair" Adds support for separate sockets for either command direction, addressing a bug where libvfio-user gets confused if both client and server send commands concurrently. Reviewed-by: Jagannathan Raman Signed-off-by: Mattias Nissler --- subprojects/libvfio-user.wrap | 2 +- 1 fi

[PATCH v12 3/3] vfio-user: Fix memory region reference accounting

2024-08-27 Thread Mattias Nissler
ix, this is now working as originally intended. Signed-off-by: Mattias Nissler --- hw/remote/vfio-user-obj.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/remote/vfio-user-obj.c b/hw/remote/vfio-user-obj.c index 0e93d7a7b4..d347a96e39 100644 --- a/hw/remote/vfio-user-obj.c +++ b

[PATCH v12 0/3] Support message-based DMA in vfio-user server

2024-08-27 Thread Mattias Nissler
ted vfio-user-server auto-shutdown from working. Mattias Nissler (3): Update subprojects/libvfio-user vfio-user: Message-based DMA support vfio-user: Fix memory region reference accounting hw/remote/trace-events| 2 + hw/remote/vfio-user-obj.c | 108 ++

[PATCH v11 0/2] Support message-based DMA in vfio-user server

2024-08-19 Thread Mattias Nissler
t to the latest libvfio-user revision. * Break out the "softmmu: Support concurrent bounce buffers" patch so this series only touches vfio-user code and can be picked up as is by Jag. Mattias Nissler (2): Update subprojects/libvfio-user vfio-user: Message-based DMA support hw/remote

[PATCH v11 2/2] vfio-user: Message-based DMA support

2024-08-19 Thread Mattias Nissler
ed-by: Jagannathan Raman Signed-off-by: Mattias Nissler --- hw/remote/trace-events| 2 + hw/remote/vfio-user-obj.c | 100 -- 2 files changed, 87 insertions(+), 15 deletions(-) diff --git a/hw/remote/trace-events b/hw/remote/trace-events index 0d1b7d56a5..358a6

[PATCH v11 1/2] Update subprojects/libvfio-user

2024-08-19 Thread Mattias Nissler
ocket pair" Adds support for separate sockets for either command direction, addressing a bug where libvfio-user gets confused if both client and server send commands concurrently. Reviewed-by: Jagannathan Raman Signed-off-by: Mattias Nissler --- subprojects/libvfio-user.wrap | 2 +- 1 fi

[PATCH] softmmu: Support concurrent bounce buffers

2024-08-19 Thread Mattias Nissler
s. Signed-off-by: Mattias Nissler Reviewed-by: Philippe Mathieu-Daudé Acked-by: Peter Xu --- This patch is split out from my "Support message-based DMA in vfio-user server" series. With the series having been partially applied, I'm splitting this one out as the only remaining patch

Re: [PATCH v9 2/5] softmmu: Support concurrent bounce buffers

2024-05-12 Thread Mattias Nissler
this patch. Thanks, Mattias [1] https://lists.nongnu.org/archive/html/qemu-devel/2024-05/msg01712.html On Wed, May 8, 2024 at 8:33 AM Mattias Nissler wrote: > > On Tue, May 7, 2024 at 4:46 PM Philippe Mathieu-Daudé > wrote: > > > > On 7/5/24 16:04, Mattias Nissler wrote:

Re: [PATCH v10 0/7] Support message-based DMA in vfio-user server

2024-05-08 Thread Mattias Nissler
On Wed, May 8, 2024 at 11:16 PM Philippe Mathieu-Daudé wrote: > > On 7/5/24 16:34, Mattias Nissler wrote: > > This series adds basic support for message-based DMA in qemu's vfio-user > > server. This is useful for cases where the client does not provide file > > des

Re: [PATCH v9 2/5] softmmu: Support concurrent bounce buffers

2024-05-07 Thread Mattias Nissler
On Tue, May 7, 2024 at 4:46 PM Philippe Mathieu-Daudé wrote: > > On 7/5/24 16:04, Mattias Nissler wrote: > > On Tue, May 7, 2024 at 2:57 PM Philippe Mathieu-Daudé > > wrote: > >> > >> On 7/5/24 11:42, Mattias Nissler wrote: > >>> When DMA memory

[PATCH v10 6/7] vfio-user: Message-based DMA support

2024-05-07 Thread Mattias Nissler
ed-by: Jagannathan Raman Signed-off-by: Mattias Nissler --- hw/remote/trace-events| 2 + hw/remote/vfio-user-obj.c | 100 -- 2 files changed, 87 insertions(+), 15 deletions(-) diff --git a/hw/remote/trace-events b/hw/remote/trace-events index 0d1b7d56a5..358a6

[PATCH v10 7/7] vfio-user: Fix config space access byte order

2024-05-07 Thread Mattias Nissler
-by: Mattias Nissler --- hw/remote/vfio-user-obj.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/remote/vfio-user-obj.c b/hw/remote/vfio-user-obj.c index a15e291c9a..0e93d7a7b4 100644 --- a/hw/remote/vfio-user-obj.c +++ b/hw/remote/vfio-user-obj.c @@ -281,7 +281,7

[PATCH v10 4/7] softmmu: Support concurrent bounce buffers

2024-05-07 Thread Mattias Nissler
s. Signed-off-by: Mattias Nissler --- hw/pci/pci.c| 8 include/exec/memory.h | 14 +++ include/hw/pci/pci_device.h | 3 ++ system/memory.c | 5 ++- system/physmem.c| 82 ++--- 5 files changed, 76 inserti

[PATCH v10 5/7] Update subprojects/libvfio-user

2024-05-07 Thread Mattias Nissler
ocket pair" Adds support for separate sockets for either command direction, addressing a bug where libvfio-user gets confused if both client and server send commands concurrently. Reviewed-by: Jagannathan Raman Signed-off-by: Mattias Nissler --- subprojects/libvfio-user.wrap | 2 +- 1 fi

[PATCH v10 0/7] Support message-based DMA in vfio-user server

2024-05-07 Thread Mattias Nissler
ch split and QEMU_MUTEX_GUARD change by phi...@linaro.org * Use size_t instead of uint32_t for bounce buffer size accounting. The qdev property remains uint32_t though, so it has a consistent size regardless of host. Mattias Nissler (6): system/physmem: Propagate AddressSpace to MapClient hel

[PATCH v10 2/7] system/physmem: Propagate AddressSpace to MapClient helpers

2024-05-07 Thread Mattias Nissler
Peter Xu Tested-by: Jonathan Cameron Signed-off-by: Mattias Nissler Message-ID: <20240507094210.300566-2-mniss...@rivosinc.com> [PMD: Split patch, part 1/2] Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Mattias Nissler --- include/exec/cpu-common.h | 2 -- incl

[PATCH v10 1/7] system/physmem: Replace qemu_mutex_lock() calls with QEMU_LOCK_GUARD

2024-05-07 Thread Mattias Nissler
Nissler Reviewed-by: Mattias Nissler --- system/physmem.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/system/physmem.c b/system/physmem.c index d3a3d8a45c..5486014cf2 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -3086,7 +3086,7 @@ void

[PATCH v10 3/7] system/physmem: Per-AddressSpace bounce buffering

2024-05-07 Thread Mattias Nissler
configured per AddressSpace. Reviewed-by: Peter Xu Tested-by: Jonathan Cameron Signed-off-by: Mattias Nissler Message-ID: <20240507094210.300566-2-mniss...@rivosinc.com> [PMD: Split patch, part 2/2] Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: M

Re: [PATCH 0/3] system/physmem: Propagate AddressSpace to MapClient helpers

2024-05-07 Thread Mattias Nissler
On Tue, May 7, 2024 at 4:02 PM Philippe Mathieu-Daudé wrote: > > On 7/5/24 14:47, Mattias Nissler wrote: > > On Tue, May 7, 2024 at 2:30 PM Philippe Mathieu-Daudé > > wrote: > >> > >> Respin of Mattias patch [1 split to ease review. > >>

Re: [PATCH v9 2/5] softmmu: Support concurrent bounce buffers

2024-05-07 Thread Mattias Nissler
On Tue, May 7, 2024 at 2:57 PM Philippe Mathieu-Daudé wrote: > > On 7/5/24 11:42, Mattias Nissler wrote: > > When DMA memory can't be directly accessed, as is the case when > > running the device model in a separate process without shareable DMA > > file descript

Re: [PATCH v8 0/5] Support message-based DMA in vfio-user server

2024-05-07 Thread Mattias Nissler
On Tue, May 7, 2024 at 2:52 PM Philippe Mathieu-Daudé wrote: > > On 7/5/24 11:43, Mattias Nissler wrote: > > > > > > On Mon, May 6, 2024 at 11:07 PM Mattias Nissler > <mailto:mniss...@rivosinc.com>> wrote: > > > > > > > >

Re: [PATCH 0/3] system/physmem: Propagate AddressSpace to MapClient helpers

2024-05-07 Thread Mattias Nissler
t; > Regards, > > Phil. > > [1 > https://lore.kernel.org/qemu-devel/20240507094210.300566-2-mniss...@rivosinc.com/ > [2] > https://lore.kernel.org/qemu-devel/20240507094210.300566-6-mniss...@rivosinc.com/ > > Mattias Nissler (2): > system/physmem: Propagate Addre

[PATCH v9 3/5] Update subprojects/libvfio-user

2024-05-07 Thread Mattias Nissler
ocket pair" Adds support for separate sockets for either command direction, addressing a bug where libvfio-user gets confused if both client and server send commands concurrently. Reviewed-by: Jagannathan Raman Signed-off-by: Mattias Nissler --- subprojects/libvfio-user.wrap | 2 +- 1 fi

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

2024-05-07 Thread Mattias Nissler
-by: Mattias Nissler --- hw/remote/vfio-user-obj.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/remote/vfio-user-obj.c b/hw/remote/vfio-user-obj.c index a15e291c9a..0e93d7a7b4 100644 --- a/hw/remote/vfio-user-obj.c +++ b/hw/remote/vfio-user-obj.c @@ -281,7 +281,7

Re: [PATCH v8 0/5] Support message-based DMA in vfio-user server

2024-05-07 Thread Mattias Nissler
On Mon, May 6, 2024 at 11:07 PM Mattias Nissler wrote: > > > On Mon, May 6, 2024 at 4:44 PM Peter Xu wrote: > >> On Thu, Mar 28, 2024 at 08:53:36AM +0100, Mattias Nissler wrote: >> > Stefan, to the best of my knowledge this is fully reviewed and ready >> >

[PATCH v9 1/5] softmmu: Per-AddressSpace bounce buffering

2024-05-07 Thread Mattias Nissler
configured per AddressSpace. Reviewed-by: Peter Xu Tested-by: Jonathan Cameron Signed-off-by: Mattias Nissler --- include/exec/cpu-common.h | 2 - include/exec/memory.h | 45 - system/dma-helpers.c | 4 +- system/memory.c | 7 +++ system/physmem.c

[PATCH v9 2/5] softmmu: Support concurrent bounce buffers

2024-05-07 Thread Mattias Nissler
s. Signed-off-by: Mattias Nissler --- hw/pci/pci.c| 8 include/exec/memory.h | 14 +++ include/hw/pci/pci_device.h | 3 ++ system/memory.c | 5 ++- system/physmem.c| 82 ++--- 5 files changed, 76 inserti

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

2024-05-07 Thread Mattias Nissler
ed-by: Jagannathan Raman Signed-off-by: Mattias Nissler --- hw/remote/trace-events| 2 + hw/remote/vfio-user-obj.c | 100 -- 2 files changed, 87 insertions(+), 15 deletions(-) diff --git a/hw/remote/trace-events b/hw/remote/trace-events index 0d1b7d56a5..358a6

[PATCH v9 0/5] Support message-based DMA in vfio-user server

2024-05-07 Thread Mattias Nissler
lean) * Change bounce buffer size accounting to use uint32_t so it works also on hosts that don't support uint64_t atomics, such as mipsel. As a consequence overflows are a real concern now, so switch to a cmpxchg loop for allocating bounce buffer space. Mattias Nissler (5): softmmu: Per-

Re: [PATCH v8 0/5] Support message-based DMA in vfio-user server

2024-05-06 Thread Mattias Nissler
On Mon, May 6, 2024 at 4:44 PM Peter Xu wrote: > On Thu, Mar 28, 2024 at 08:53:36AM +0100, Mattias Nissler wrote: > > Stefan, to the best of my knowledge this is fully reviewed and ready > > to go in - can you kindly pick it up or advise in case there's > > something I

Re: [PATCH v8 0/5] Support message-based DMA in vfio-user server

2024-05-06 Thread Mattias Nissler
On Mon, May 6, 2024 at 5:01 PM Stefan Hajnoczi wrote: > On Thu, 28 Mar 2024 at 03:54, Mattias Nissler > wrote: > > > > Stefan, to the best of my knowledge this is fully reviewed and ready > > to go in - can you kindly pick it up or advise in case there's > > s

Re: [PATCH v8 0/5] Support message-based DMA in vfio-user server

2024-03-28 Thread Mattias Nissler
Stefan, to the best of my knowledge this is fully reviewed and ready to go in - can you kindly pick it up or advise in case there's something I missed? Thanks! On Mon, Mar 4, 2024 at 11:25 AM Peter Xu wrote: > > On Mon, Mar 04, 2024 at 02:05:49AM -0800, Mattias Nissler wrote: >

[PATCH v8 1/5] softmmu: Per-AddressSpace bounce buffering

2024-03-04 Thread Mattias Nissler
configured per AddressSpace. Reviewed-by: Peter Xu Tested-by: Jonathan Cameron Signed-off-by: Mattias Nissler --- include/exec/cpu-common.h | 2 - include/exec/memory.h | 45 - system/dma-helpers.c | 4 +- system/memory.c | 7 +++ system/physmem.c

[PATCH v8 2/5] softmmu: Support concurrent bounce buffers

2024-03-04 Thread Mattias Nissler
Reviewed-by: Peter Xu Tested-by: Jonathan Cameron Signed-off-by: Mattias Nissler --- hw/pci/pci.c| 8 include/exec/memory.h | 14 +++ include/hw/pci/pci_device.h | 3 ++ system/memory.c | 5 ++- system/physmem.c

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

2024-03-04 Thread Mattias Nissler
ed-by: Jagannathan Raman Signed-off-by: Mattias Nissler --- hw/remote/trace-events| 2 + hw/remote/vfio-user-obj.c | 100 -- 2 files changed, 87 insertions(+), 15 deletions(-) diff --git a/hw/remote/trace-events b/hw/remote/trace-events index 0d1b7d56a5..358a6

[PATCH v8 3/5] Update subprojects/libvfio-user

2024-03-04 Thread Mattias Nissler
ocket pair" Adds support for separate sockets for either command direction, addressing a bug where libvfio-user gets confused if both client and server send commands concurrently. Reviewed-by: Jagannathan Raman Signed-off-by: Mattias Nissler --- subprojects/libvfio-user.wrap | 2 +- 1 fi

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

2024-03-04 Thread Mattias Nissler
-by: Mattias Nissler --- hw/remote/vfio-user-obj.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/remote/vfio-user-obj.c b/hw/remote/vfio-user-obj.c index a15e291c9a..0e93d7a7b4 100644 --- a/hw/remote/vfio-user-obj.c +++ b/hw/remote/vfio-user-obj.c @@ -281,7 +281,7

[PATCH v8 0/5] Support message-based DMA in vfio-user server

2024-03-04 Thread Mattias Nissler
ightforward merge conflict in system/dma-helpers.c Changes from v7: * Rebase (applied cleanly) * Restore various Reviewed-by and Tested-by tags that I failed to carry forward (I double-checked that the patches haven't changed since the reviewed version) Mattias Nissler (5): softmmu:

Re: [PATCH, v2] physmem: avoid bounce buffer too small

2024-02-29 Thread Mattias Nissler
On Thu, Feb 29, 2024 at 1:35 PM Peter Maydell wrote: > > On Thu, 29 Feb 2024 at 11:17, Heinrich Schuchardt > wrote: > > > But yes, I'm not surprised that CXL runs into this. Heinrich, > > > are you doing CXL testing, or is this some other workload? > > > > I am running the UEFI Self-Certification

Re: [PATCH, v2] physmem: avoid bounce buffer too small

2024-02-29 Thread Mattias Nissler
On Thu, Feb 29, 2024 at 12:12 PM Peter Maydell wrote: > > On Thu, 29 Feb 2024 at 10:59, Jonathan Cameron > wrote: > > > > On Thu, 29 Feb 2024 09:38:29 + > > Peter Maydell wrote: > > > > > On Wed, 28 Feb 2024 at 19:07, Heinrich Schuchardt > > > wrote: > > > > > > > > On 28.02.24 19:39, Peter

Re: [PATCH v7 0/5] Support message-based DMA in vfio-user server

2024-02-29 Thread Mattias Nissler
o to speak up if you disagree. Thanks, Mattias On Tue, Feb 20, 2024 at 6:06 AM Peter Xu wrote: > > On Mon, Feb 12, 2024 at 12:06:12AM -0800, Mattias Nissler wrote: > > Changes from v6: > > > > * Rebase, resolve straightforward merge conflict in system/dma-helpers.c >

Re: [PATCH, v2] physmem: avoid bounce buffer too small

2024-02-29 Thread Mattias Nissler
On Thu, Feb 29, 2024 at 11:22 AM Heinrich Schuchardt wrote: > > On 29.02.24 02:11, Peter Xu wrote: > > On Wed, Feb 28, 2024 at 08:07:47PM +0100, Heinrich Schuchardt wrote: > >> On 28.02.24 19:39, Peter Maydell wrote: > >>> On Wed, 28 Feb 2024 at 18:28, Heinrich Schuchardt > >>> wrote: > > >>

Re: Crash with CXL + TCG on 8.2: Was Re: qemu cxl memory expander shows numa_node -1

2024-02-18 Thread Mattias Nissler
On Thu, Feb 15, 2024 at 4:29 PM Jonathan Cameron < jonathan.came...@huawei.com> wrote: > On Thu, 8 Feb 2024 14:50:59 + > Jonathan Cameron wrote: > > > On Wed, 7 Feb 2024 17:34:15 + > > Jonathan Cameron wrote: > > > > > On Fri, 2 Feb 2024 16:56:18 + > > > Peter Maydell wrote: > > > >

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

2024-02-12 Thread Mattias Nissler
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 --- hw/remote/vfio-user-obj.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH v7 3/5] Update subprojects/libvfio-user

2024-02-12 Thread Mattias Nissler
ocket pair" Adds support for separate sockets for either command direction, addressing a bug where libvfio-user gets confused if both client and server send commands concurrently. Signed-off-by: Mattias Nissler --- subprojects/libvfio-user.wrap | 2 +- 1 file changed, 1 insertion(+), 1 de

Re: [PATCH v6 0/5] Support message-based DMA in vfio-user server

2024-02-12 Thread Mattias Nissler
es cleanly to master due to a minor merge conflict. I've just sent a rebased version to address that. Stefan, are you OK to pick this up for merging at your next convenience? Thanks, Mattias On Fri, Feb 9, 2024 at 6:39 PM Jonathan Cameron wrote: > On Wed, 1 Nov 2023 06:16:06 -0700

[PATCH v7 1/5] softmmu: Per-AddressSpace bounce buffering

2024-02-12 Thread Mattias Nissler
configured per AddressSpace. Signed-off-by: Mattias Nissler --- include/exec/cpu-common.h | 2 - include/exec/memory.h | 45 - system/dma-helpers.c | 4 +- system/memory.c | 7 +++ system/physmem.c | 101 -- 5

[PATCH v7 2/5] softmmu: Support concurrent bounce buffers

2024-02-12 Thread Mattias Nissler
s. Signed-off-by: Mattias Nissler --- hw/pci/pci.c| 8 include/exec/memory.h | 14 +++ include/hw/pci/pci_device.h | 3 ++ system/memory.c | 5 ++- system/physmem.c| 80 + 5 files changed, 74 inserti

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

2024-02-12 Thread Mattias Nissler
ff-by: Mattias Nissler --- hw/remote/trace-events| 2 + hw/remote/vfio-user-obj.c | 100 -- 2 files changed, 87 insertions(+), 15 deletions(-) diff --git a/hw/remote/trace-events b/hw/remote/trace-events index 0d1b7d56a5..358a68fb34 100644 --- a/hw/remote/

[PATCH v7 0/5] Support message-based DMA in vfio-user server

2024-02-12 Thread Mattias Nissler
ightforward merge conflict in system/dma-helpers.c Mattias Nissler (5): softmmu: Per-AddressSpace bounce buffering softmmu: Support concurrent bounce buffers Update subprojects/libvfio-user vfio-user: Message-based DMA support vfio-user: Fix config space access byte order hw/pci/pci.c

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

2023-11-01 Thread Mattias Nissler
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 --- hw/remote/vfio-user-obj.c | 4 ++-- 1 file changed, 2 insertions(+), 2

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

2023-11-01 Thread Mattias Nissler
ocket pair" Adds support for separate sockets for either command direction, addressing a bug where libvfio-user gets confused if both client and server send commands concurrently. Signed-off-by: Mattias Nissler --- subprojects/libvfio-user.wrap | 2 +- 1 file changed, 1 insertion(+), 1 de

[PATCH v6 2/5] softmmu: Support concurrent bounce buffers

2023-11-01 Thread Mattias Nissler
s. Signed-off-by: Mattias Nissler --- hw/pci/pci.c| 8 include/exec/memory.h | 14 +++ include/hw/pci/pci_device.h | 3 ++ system/memory.c | 5 ++- system/physmem.c| 80 + 5 files changed, 74 inserti

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

2023-11-01 Thread Mattias Nissler
ff-by: Mattias Nissler --- hw/remote/trace-events| 2 + hw/remote/vfio-user-obj.c | 100 -- 2 files changed, 87 insertions(+), 15 deletions(-) diff --git a/hw/remote/trace-events b/hw/remote/trace-events index 0d1b7d56a5..358a68fb34 100644 --- a/hw/remote/

[PATCH v6 1/5] softmmu: Per-AddressSpace bounce buffering

2023-11-01 Thread Mattias Nissler
configured per AddressSpace. Signed-off-by: Mattias Nissler --- include/exec/cpu-common.h | 2 - include/exec/memory.h | 45 - system/dma-helpers.c | 4 +- system/memory.c | 7 +++ system/physmem.c | 101 -- 5

[PATCH v6 0/5] Support message-based DMA in vfio-user server

2023-11-01 Thread Mattias Nissler
e been reviewed appropriately, so my hope is that this will be the final iteration. Stefan, Peter, Jag, thanks for your feedback, let me know if there's anything else needed from my side before this can get merged. Mattias Nissler (5): softmmu: Per-AddressSpace bounce buffering softmmu:

Re: [RFC] Proposal of QEMU PCI Endpoint test environment

2023-10-06 Thread Mattias Nissler
On Fri, Oct 6, 2023 at 1:51 PM Shunsuke Mie wrote: > > > On 2023/10/05 16:02, Mattias Nissler wrote: > > On Thu, Oct 5, 2023 at 3:31 AM Shunsuke Mie wrote: > >> Hi Jiri, Mattias and all. > >> > >> 2023年10月4日(水) 16:36 Mattias Nissler : > >>>

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

2023-10-06 Thread Mattias Nissler
On Wed, Oct 4, 2023 at 4:54 PM Jag Raman wrote: > > > > 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 b

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

2023-10-05 Thread Mattias Nissler
On Thu, Oct 5, 2023 at 6:30 PM Jag Raman wrote: > > > > 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

Re: [RFC] Proposal of QEMU PCI Endpoint test environment

2023-10-05 Thread Mattias Nissler
On Thu, Oct 5, 2023 at 3:31 AM Shunsuke Mie wrote: > > Hi Jiri, Mattias and all. > > 2023年10月4日(水) 16:36 Mattias Nissler : >>> >>> hi shunsuke, all, >>> what about vfio-user + qemu? > > Thank you for the suggestion. > >> FWIW, I have ha

Re: [RFC] Proposal of QEMU PCI Endpoint test environment

2023-10-04 Thread Mattias Nissler
> > hi shunsuke, all, > what about vfio-user + qemu? > FWIW, I have had some good success using VFIO-user to bridge software components to hardware designs. For the most part, I have been hooking up software endpoint models to hardware design components speaking the PCIe transaction layer protocol

[PATCH v5 2/5] softmmu: Support concurrent bounce buffers

2023-09-20 Thread Mattias Nissler
s. Signed-off-by: Mattias Nissler --- hw/pci/pci.c| 8 include/exec/memory.h | 14 +++ include/hw/pci/pci_device.h | 3 ++ softmmu/memory.c| 5 ++- softmmu/physmem.c | 80 + 5 files changed, 74 inserti

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

2023-09-20 Thread Mattias Nissler
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 --- hw/remote/vfio-user-obj.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH v5 1/5] softmmu: Per-AddressSpace bounce buffering

2023-09-20 Thread Mattias Nissler
configured per AddressSpace. Signed-off-by: Mattias Nissler --- include/exec/cpu-common.h | 2 - include/exec/memory.h | 45 - softmmu/dma-helpers.c | 4 +- softmmu/memory.c | 7 +++ softmmu/physmem.c | 101 -- 5

[PATCH v5 3/5] Update subprojects/libvfio-user

2023-09-20 Thread Mattias Nissler
ocket pair" Adds support for separate sockets for either command direction, addressing a bug where libvfio-user gets confused if both client and server send commands concurrently. Signed-off-by: Mattias Nissler --- subprojects/libvfio-user.wrap | 2 +- 1 file changed, 1 insertion(+), 1 de

[PATCH v5 0/5] Support message-based DMA in vfio-user server

2023-09-20 Thread Mattias Nissler
xes. Changes from v4: * Fix accidentally dropped memory_region_unref, control flow restored to match previous code to simplify review. * Some cosmetic fixes. Mattias Nissler (5): softmmu: Per-AddressSpace bounce buffering softmmu: Support concurrent bounce buffers Update subprojects/libv

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

2023-09-20 Thread Mattias Nissler
ff-by: Mattias Nissler --- hw/remote/trace-events| 2 + hw/remote/vfio-user-obj.c | 84 +++ 2 files changed, 79 insertions(+), 7 deletions(-) diff --git a/hw/remote/trace-events b/hw/remote/trace-events index 0d1b7d56a5..358a68fb34 100644 --- a/hw/remote/trace-e

Re: [PATCH v4 2/5] softmmu: Support concurrent bounce buffers

2023-09-19 Thread Mattias Nissler
On Tue, Sep 19, 2023 at 7:14 PM Peter Xu wrote: > > On Tue, Sep 19, 2023 at 09:08:10AM -0700, Mattias Nissler wrote: > > @@ -3119,31 +3143,35 @@ void *address_space_map(AddressSpace *as, > > void address_space_unmap(AddressSpace *as, void *buffer, hwaddr len, > >

[PATCH v4 2/5] softmmu: Support concurrent bounce buffers

2023-09-19 Thread Mattias Nissler
s. Signed-off-by: Mattias Nissler --- hw/pci/pci.c| 8 include/exec/memory.h | 14 +++--- include/hw/pci/pci_device.h | 3 ++ softmmu/memory.c| 5 ++- softmmu/physmem.c | 88 - 5 files changed, 77 inserti

[PATCH v4 3/5] Update subprojects/libvfio-user

2023-09-19 Thread Mattias Nissler
ocket pair" Adds support for separate sockets for either command direction, addressing a bug where libvfio-user gets confused if both client and server send commands concurrently. Signed-off-by: Mattias Nissler --- subprojects/libvfio-user.wrap | 2 +- 1 file changed, 1 insertion(+), 1 de

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

2023-09-19 Thread Mattias Nissler
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 --- hw/remote/vfio-user-obj.c | 4 ++-- 1 file changed, 2 insertions(+), 2

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

2023-09-19 Thread Mattias Nissler
ff-by: Mattias Nissler --- hw/remote/trace-events| 2 + hw/remote/vfio-user-obj.c | 84 +++ 2 files changed, 79 insertions(+), 7 deletions(-) diff --git a/hw/remote/trace-events b/hw/remote/trace-events index 0d1b7d56a5..358a68fb34 100644 --- a/hw/remote/trace-e

[PATCH v4 0/5] Support message-based DMA in vfio-user server

2023-09-19 Thread Mattias Nissler
server->client DMA access commands. See https://github.com/nutanix/libvfio-user/issues/279 for details. * Add missing teardown code in do_address_space_destroy. * Fix bounce buffer size bookkeeping race condition. * Generate unmap notification callbacks unconditionally. * Some cosmet

[PATCH v4 1/5] softmmu: Per-AddressSpace bounce buffering

2023-09-19 Thread Mattias Nissler
configured per AddressSpace. Signed-off-by: Mattias Nissler --- include/exec/cpu-common.h | 2 - include/exec/memory.h | 45 - softmmu/dma-helpers.c | 4 +- softmmu/memory.c | 7 +++ softmmu/physmem.c | 103 -- 5

Re: [PATCH v3 1/5] softmmu: Per-AddressSpace bounce buffering

2023-09-19 Thread Mattias Nissler
On Fri, Sep 15, 2023 at 10:37 AM Mattias Nissler wrote: > > On Wed, Sep 13, 2023 at 8:30 PM Peter Xu wrote: > > > > On Thu, Sep 07, 2023 at 06:04:06AM -0700, Mattias Nissler wrote: > > > @@ -3105,6 +3105,9 @@ void address_space_init(AddressSpace *as, > > >

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

2023-09-15 Thread Mattias Nissler
On Thu, Sep 14, 2023 at 10:32 PM Stefan Hajnoczi wrote: > > On Thu, Sep 07, 2023 at 06:04:10AM -0700, 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 &

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

2023-09-15 Thread Mattias Nissler
On Thu, Sep 14, 2023 at 9:04 PM Stefan Hajnoczi wrote: > > On Thu, Sep 07, 2023 at 06:04:09AM -0700, 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 performe

Re: [PATCH v3 2/5] softmmu: Support concurrent bounce buffers

2023-09-15 Thread Mattias Nissler
On Thu, Sep 14, 2023 at 8:49 PM Stefan Hajnoczi wrote: > > On Thu, Sep 07, 2023 at 06:04:07AM -0700, Mattias Nissler wrote: > > When DMA memory can't be directly accessed, as is the case when > > running the device model in a separate process without shareable DMA >

Re: [PATCH v3 2/5] softmmu: Support concurrent bounce buffers

2023-09-15 Thread Mattias Nissler
On Wed, Sep 13, 2023 at 9:11 PM Peter Xu wrote: > > On Thu, Sep 07, 2023 at 06:04:07AM -0700, Mattias Nissler wrote: > > When DMA memory can't be directly accessed, as is the case when > > running the device model in a separate process without shareable DMA > > file

Re: [PATCH v3 1/5] softmmu: Per-AddressSpace bounce buffering

2023-09-15 Thread Mattias Nissler
On Wed, Sep 13, 2023 at 8:30 PM Peter Xu wrote: > > On Thu, Sep 07, 2023 at 06:04:06AM -0700, Mattias Nissler wrote: > > @@ -3105,6 +3105,9 @@ void address_space_init(AddressSpace *as, > > MemoryRegion *root, const char *name) > > as->ioeventfds = NULL; > >

Re: [PATCH v3 0/5] Support message-based DMA in vfio-user server

2023-09-15 Thread Mattias Nissler
On Thu, Sep 14, 2023 at 4:39 PM Stefan Hajnoczi wrote: > > On Thu, Sep 07, 2023 at 06:04:05AM -0700, Mattias Nissler wrote: > > This series adds basic support for message-based DMA in qemu's vfio-user > > server. This is useful for cases where the client does not provide f

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

2023-09-07 Thread Mattias Nissler
ff-by: Mattias Nissler --- hw/remote/trace-events| 2 + hw/remote/vfio-user-obj.c | 84 +++ 2 files changed, 79 insertions(+), 7 deletions(-) diff --git a/hw/remote/trace-events b/hw/remote/trace-events index 0d1b7d56a5..358a68fb34 100644 --- a/hw/remote/trace-e

[PATCH v3 3/5] Update subprojects/libvfio-user

2023-09-07 Thread Mattias Nissler
Brings in assorted bug fixes. In particular, "Fix address calculation for message-based DMA" corrects a bug in DMA address calculation which is necessary to get DMA across VFIO-user messages working. Signed-off-by: Mattias Nissler --- subprojects/libvfio-user.wrap | 2 +- 1 file

[PATCH v3 2/5] softmmu: Support concurrent bounce buffers

2023-09-07 Thread Mattias Nissler
s. Signed-off-by: Mattias Nissler --- hw/pci/pci.c| 8 include/exec/memory.h | 14 ++ include/hw/pci/pci_device.h | 3 ++ softmmu/memory.c| 3 +- softmmu/physmem.c | 94 + 5 files changed, 80 inserti

[PATCH v3 0/5] Support message-based DMA in vfio-user server

2023-09-07 Thread Mattias Nissler
in first bytes of bounce buffer struct as a best effort measure to detect invalid pointers in address_space_unmap. Mattias Nissler (5): softmmu: Per-AddressSpace bounce buffering softmmu: Support concurrent bounce buffers Update subprojects/libvfio-user vfio-user: Message-based DMA suppor

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

2023-09-07 Thread Mattias Nissler
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 --- hw/remote/vfio-user-obj.c | 4 ++-- 1 file changed, 2 insertions(+), 2

  1   2   >