Re: [PATCH v5 7/7] vhost-user-devive: Add shmem BAR

2025-06-20 Thread Albert Esteve
On Fri, Jun 20, 2025 at 11:08 AM Dorinda Bassey wrote: > > Hi Albert, > > Thank you for these patches, just a small issue you could add to your > next series. > > > > > + > > +memory_region_init(virtio_new_shmem_region(vdev, i)->mr, > > + OBJECT(vdev), "vu

Re: [PATCH v5 1/7] vhost-user: Add VirtIO Shared Memory map request

2025-06-16 Thread Albert Esteve
Sorry I did not reply-all. Albert Esteve Principal Software Engineer Red Hat aest...@redhat.com On Mon, Jun 16, 2025 at 5:28 PM Albert Esteve wrote: > > > > On Thu, Jun 12, 2025 at 6:19 PM Stefan Hajnoczi wrote: > > > > On Mon, Jun 09, 2025 at 04:47:23PM +0

Re: [PATCH v5 3/7] vhost_user.rst: Add SHMEM_MAP/_UNMAP to spec

2025-06-11 Thread Albert Esteve
On Wed, Jun 11, 2025 at 8:21 AM Alyssa Ross wrote: > > Albert Esteve writes: > > > Add SHMEM_MAP/_UNMAP request to the vhost-user > > spec documentation. > > > > Reviewed-by: Stefan Hajnoczi > > Signed-off-by: Albert Esteve > &

[PATCH v5 5/7] vhost_user.rst: Add GET_SHMEM_CONFIG message

2025-06-09 Thread Albert Esteve
Add GET_SHMEM_CONFIG vhost-user frontend message to the spec documentation. Reviewed-by: Alyssa Ross Reviewed-by: Stefan Hajnoczi Signed-off-by: Albert Esteve --- docs/interop/vhost-user.rst | 39 + 1 file changed, 39 insertions(+) diff --git a/docs

[PATCH v5 3/7] vhost_user.rst: Add SHMEM_MAP/_UNMAP to spec

2025-06-09 Thread Albert Esteve
Add SHMEM_MAP/_UNMAP request to the vhost-user spec documentation. Reviewed-by: Stefan Hajnoczi Signed-off-by: Albert Esteve --- docs/interop/vhost-user.rst | 55 + 1 file changed, 55 insertions(+) diff --git a/docs/interop/vhost-user.rst b/docs/interop

[PATCH v5 6/7] qmp: add shmem feature map

2025-06-09 Thread Albert Esteve
Add new vhost-user protocol VHOST_USER_PROTOCOL_F_SHMEM feature to feature map. Reviewed-by: Stefan Hajnoczi Signed-off-by: Albert Esteve --- hw/virtio/virtio-qmp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/virtio/virtio-qmp.c b/hw/virtio/virtio-qmp.c index 3b6377cf0d

[PATCH v5 7/7] vhost-user-devive: Add shmem BAR

2025-06-09 Thread Albert Esteve
VHOST_USER_PROTOCOL_F_SHMEM feature is not supported by the backend, there is no cache. Signed-off-by: Albert Esteve --- hw/virtio/vhost-user-base.c | 47 +-- hw/virtio/vhost-user-device-pci.c | 34 -- 2 files changed, 76 insertions(+), 5

[PATCH v5 4/7] vhost_user: Add frontend get_shmem_config command

2025-06-09 Thread Albert Esteve
`vhost-user-device` case. Signed-off-by: Albert Esteve --- hw/virtio/vhost-user.c| 43 +++ include/hw/virtio/vhost-backend.h | 10 +++ include/hw/virtio/vhost-user.h| 1 + include/hw/virtio/virtio.h| 2 ++ 4 files changed, 56 insertions

[PATCH v5 2/7] vhost_user.rst: Align VhostUserMsg excerpt members

2025-06-09 Thread Albert Esteve
Add missing members to the VhostUserMsg excerpt in the vhost-user spec documentation. Reviewed-by: Stefan Hajnoczi Signed-off-by: Albert Esteve --- docs/interop/vhost-user.rst | 4 1 file changed, 4 insertions(+) diff --git a/docs/interop/vhost-user.rst b/docs/interop/vhost-user.rst

[PATCH v5 0/7] vhost-user: Add SHMEM_MAP/UNMAP requests

2025-06-09 Thread Albert Esteve
vel of validation. This patch also includes: - SHMEM_CONFIG frontend request that is specifically meant to allow generic vhost-user-device frontend to be able to query VIRTIO Shared Memory settings from the backend (as this device is generic and agnostic of the actual backend configuration). Albert Est

[PATCH v5 1/7] vhost-user: Add VirtIO Shared Memory map request

2025-06-09 Thread Albert Esteve
needs to create VirtSharedMemory instances for the VirtIO Shared Memory Regions and add them to the `VirtIODevice` instance. Signed-off-by: Albert Esteve --- hw/virtio/vhost-user.c| 150 ++ hw/virtio/virtio.c| 97 ++ include

Re: [PATCH v4 1/9] vhost-user: Add VirtIO Shared Memory map request

2025-03-11 Thread Albert Esteve
On Tue, Feb 18, 2025 at 7:43 AM Stefan Hajnoczi wrote: > > On Mon, Feb 17, 2025 at 05:40:04PM +0100, Albert Esteve wrote: > > Add SHMEM_MAP/UNMAP requests to vhost-user to > > handle VIRTIO Shared Memory mappings. > > > > This request allows backends to dynamic

Re: [PATCH v4 0/9] vhost-user: Add SHMEM_MAP/UNMAP requests

2025-02-24 Thread Albert Esteve
On Mon, Feb 24, 2025 at 2:57 PM David Hildenbrand wrote: > > On 24.02.25 14:41, Albert Esteve wrote: > > On Mon, Feb 24, 2025 at 10:49 AM David Hildenbrand wrote: > >> > >> On 24.02.25 10:35, Albert Esteve wrote: > >>> On Mon, Feb 24, 2025 a

Re: [PATCH v4 0/9] vhost-user: Add SHMEM_MAP/UNMAP requests

2025-02-24 Thread Albert Esteve
On Mon, Feb 24, 2025 at 10:49 AM David Hildenbrand wrote: > > On 24.02.25 10:35, Albert Esteve wrote: > > On Mon, Feb 24, 2025 at 10:16 AM David Hildenbrand wrote: > >> > >> On 24.02.25 09:54, Albert Esteve wrote: > >>> On Mon, Feb 17, 2025

Re: [PATCH v4 0/9] vhost-user: Add SHMEM_MAP/UNMAP requests

2025-02-24 Thread Albert Esteve
On Mon, Feb 24, 2025 at 10:16 AM David Hildenbrand wrote: > > On 24.02.25 09:54, Albert Esteve wrote: > > On Mon, Feb 17, 2025 at 9:01 PM David Hildenbrand wrote: > >> > >> On 17.02.25 17:40, Albert Esteve wrote: > >>> Hi all, > >>> > &

Re: [PATCH v4 0/9] vhost-user: Add SHMEM_MAP/UNMAP requests

2025-02-24 Thread Albert Esteve
On Mon, Feb 17, 2025 at 9:01 PM David Hildenbrand wrote: > > On 17.02.25 17:40, Albert Esteve wrote: > > Hi all, > > > > Hi, > > looks like our debugging session was successfu :) > > One question below. > > > v3->v4 > > - Change mmap strategy

Re: [PATCH v4 7/9] vhost-user-devive: Add shmem BAR

2025-02-18 Thread Albert Esteve
On Tue, Feb 18, 2025 at 2:29 PM Stefan Hajnoczi wrote: > > On Tue, Feb 18, 2025 at 11:55:33AM +0100, Albert Esteve wrote: > > On Tue, Feb 18, 2025 at 11:41 AM Stefan Hajnoczi > > wrote: > > > > > > On Mon, Feb 17, 2025 at 05:40:10PM +0100, Albert Esteve wro

Re: [PATCH v4 9/9] vhost_user.rst: Add MEM_READ/WRITE messages

2025-02-18 Thread Albert Esteve
On Tue, Feb 18, 2025 at 12:00 PM Stefan Hajnoczi wrote: > > On Mon, Feb 17, 2025 at 05:40:12PM +0100, Albert Esteve wrote: > > Add MEM_READ/WRITE request to the vhost-user > > spec documentation. > > > > Signed-off-by: Albert Esteve > > --- &

Re: [PATCH v4 7/9] vhost-user-devive: Add shmem BAR

2025-02-18 Thread Albert Esteve
On Tue, Feb 18, 2025 at 11:41 AM Stefan Hajnoczi wrote: > > On Mon, Feb 17, 2025 at 05:40:10PM +0100, Albert Esteve wrote: > > Add a shmem BAR block in the vhost-user-device, > > which files can be directly mapped into. > > > > The number, shmid, and size o

Re: [PATCH v4 1/9] vhost-user: Add VirtIO Shared Memory map request

2025-02-18 Thread Albert Esteve
On Tue, Feb 18, 2025 at 7:43 AM Stefan Hajnoczi wrote: > > On Mon, Feb 17, 2025 at 05:40:04PM +0100, Albert Esteve wrote: > > Add SHMEM_MAP/UNMAP requests to vhost-user to > > handle VIRTIO Shared Memory mappings. > > > > This request allows backends to dynamic

[PATCH v4 0/9] vhost-user: Add SHMEM_MAP/UNMAP requests

2025-02-17 Thread Albert Esteve
as it is missing from their translation table. So these requests are a fallback for vhost-user memory translation fails. Albert Esteve (9): vhost-user: Add VirtIO Shared Memory map request vhost_user.rst: Align VhostUserMsg excerpt members vhost_user.rst: Add SHMEM_MAP/_UNMAP to s

[PATCH v4 9/9] vhost_user.rst: Add MEM_READ/WRITE messages

2025-02-17 Thread Albert Esteve
Add MEM_READ/WRITE request to the vhost-user spec documentation. Signed-off-by: Albert Esteve --- docs/interop/vhost-user.rst | 33 + 1 file changed, 33 insertions(+) diff --git a/docs/interop/vhost-user.rst b/docs/interop/vhost-user.rst index 96156f1900

[PATCH v4 6/9] qmp: add shmem feature map

2025-02-17 Thread Albert Esteve
Add new vhost-user protocol VHOST_USER_PROTOCOL_F_SHMEM feature to feature map. Signed-off-by: Albert Esteve --- hw/virtio/virtio-qmp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/virtio/virtio-qmp.c b/hw/virtio/virtio-qmp.c index 3b6377cf0d..8c2cfd0916 100644 --- a/hw/virtio

[PATCH v4 8/9] vhost_user: Add mem_read/write backend requests

2025-02-17 Thread Albert Esteve
/WRITE requests have flexible array members, since we do not know in advance the number of bytes in the mapped region. Therefore, we need to allow bigger message sizes for these types, and ensure we allocate sufficient memory for them. Signed-off-by: Albert Esteve --- hw/virtio/vhost-user.c

[PATCH v4 4/9] vhost_user: Add frontend get_shmem_config command

2025-02-17 Thread Albert Esteve
`vhost-user-device` case. Signed-off-by: Albert Esteve --- hw/virtio/vhost-user.c| 43 +++ include/hw/virtio/vhost-backend.h | 9 +++ include/hw/virtio/vhost-user.h| 1 + include/hw/virtio/virtio.h| 2 ++ 4 files changed, 55 insertions

[PATCH v4 3/9] vhost_user.rst: Add SHMEM_MAP/_UNMAP to spec

2025-02-17 Thread Albert Esteve
Add SHMEM_MAP/_UNMAP request to the vhost-user spec documentation. Reviewed-by: Stefan Hajnoczi Signed-off-by: Albert Esteve --- docs/interop/vhost-user.rst | 34 ++ 1 file changed, 34 insertions(+) diff --git a/docs/interop/vhost-user.rst b/docs/interop/vhost

[PATCH v4 2/9] vhost_user.rst: Align VhostUserMsg excerpt members

2025-02-17 Thread Albert Esteve
Add missing members to the VhostUserMsg excerpt in the vhost-user spec documentation. Signed-off-by: Albert Esteve --- docs/interop/vhost-user.rst | 4 1 file changed, 4 insertions(+) diff --git a/docs/interop/vhost-user.rst b/docs/interop/vhost-user.rst index 2e50f2ddfa..436a94c0ee

[PATCH v4 7/9] vhost-user-devive: Add shmem BAR

2025-02-17 Thread Albert Esteve
VHOST_USER_PROTOCOL_F_SHMEM feature is not supported by the backend, there is no cache. Signed-off-by: Albert Esteve --- hw/virtio/vhost-user-base.c | 47 +-- hw/virtio/vhost-user-device-pci.c | 36 +-- 2 files changed, 78 insertions(+), 5

[PATCH v4 5/9] vhost_user.rst: Add GET_SHMEM_CONFIG message

2025-02-17 Thread Albert Esteve
Add GET_SHMEM_CONFIG vhost-user frontend message to the spec documentation. Reviewed-by: Alyssa Ross Signed-off-by: Albert Esteve --- docs/interop/vhost-user.rst | 39 + 1 file changed, 39 insertions(+) diff --git a/docs/interop/vhost-user.rst b/docs

[PATCH v4 1/9] vhost-user: Add VirtIO Shared Memory map request

2025-02-17 Thread Albert Esteve
needs to create VirtSharedMemory instances for the VirtIO Shared Memory Regions and add them to the `VirtIODevice` instance. Signed-off-by: Albert Esteve --- hw/virtio/vhost-user.c| 134 ++ hw/virtio/virtio.c| 81 + include

Re: [PATCH v3 1/5] vhost-user: Add VIRTIO Shared Memory map request

2024-11-27 Thread Albert Esteve
On Wed, Nov 27, 2024 at 11:50 AM David Hildenbrand wrote: > > > >> RAM memory region/ RAMBlock that has properly set flags/fd/whatssoever > >> and map whatever you want in there. > >> > >> Likely you would need a distinct RAMBlock/RAM memory region per mmap(), > >> and would end up mmaping implici

Re: [PATCH v3 1/5] vhost-user: Add VIRTIO Shared Memory map request

2024-11-27 Thread Albert Esteve
On Wed, Nov 27, 2024 at 1:18 PM David Hildenbrand wrote: > > On 27.11.24 13:10, David Hildenbrand wrote: > > On 27.11.24 11:50, David Hildenbrand wrote: > >> > RAM memory region/ RAMBlock that has properly set flags/fd/whatssoever > and map whatever you want in there. > > Likel

Re: [PATCH v3 4/5] vhost-user-dev: Add cache BAR

2024-11-26 Thread Albert Esteve
On Tue, Sep 17, 2024 at 10:27 AM Stefan Hajnoczi wrote: > > On Thu, Sep 12, 2024 at 04:53:34PM +0200, Albert Esteve wrote: > > Add a cache BAR in the vhost-user-device > > into which files can be directly mapped. > > > > The number, shmid, and size of the VIRTIO S

Re: [PATCH v3 4/5] vhost-user-dev: Add cache BAR

2024-11-25 Thread Albert Esteve
On Mon, Nov 25, 2024 at 5:16 PM Albert Esteve wrote: > > On Tue, Sep 17, 2024 at 10:27 AM Stefan Hajnoczi wrote: > > > > On Thu, Sep 12, 2024 at 04:53:34PM +0200, Albert Esteve wrote: > > > Add a cache BAR in the vhost-user-device > > > into which files can

Re: [PATCH v3 4/5] vhost-user-dev: Add cache BAR

2024-11-25 Thread Albert Esteve
On Tue, Sep 17, 2024 at 10:27 AM Stefan Hajnoczi wrote: > > On Thu, Sep 12, 2024 at 04:53:34PM +0200, Albert Esteve wrote: > > Add a cache BAR in the vhost-user-device > > into which files can be directly mapped. > > > > The number, shmid, and size of the VIRTIO S

Re: [PATCH v3 1/5] vhost-user: Add VIRTIO Shared Memory map request

2024-11-25 Thread Albert Esteve
On Mon, Sep 16, 2024 at 7:21 PM Stefan Hajnoczi wrote: > > On Thu, Sep 12, 2024 at 04:53:31PM +0200, Albert Esteve wrote: > > Add SHMEM_MAP/UNMAP requests to vhost-user to > > handle VIRTIO Shared Memory mappings. > > > > This request allows backends to dynamic

Re: [PATCH v3 1/5] vhost-user: Add VIRTIO Shared Memory map request

2024-11-25 Thread Albert Esteve
On Tue, Sep 17, 2024 at 12:08 PM David Hildenbrand wrote: > > On 12.09.24 16:53, Albert Esteve wrote: > > Add SHMEM_MAP/UNMAP requests to vhost-user to > > handle VIRTIO Shared Memory mappings. > > > > This request allows backends to dynamically map > > fd

Re: [PATCH] virtio-dmabuf: Ensure UUID persistence for hash table insertion

2024-11-07 Thread Albert Esteve
uuid, value); > +QemuUUID *persistent_uuid = g_memdup2(uuid, sizeof(QemuUUID)); > +if (persistent_uuid == NULL) { > +result = false; > +} else { > + g_hash_table_insert(resource_uuids, persistent_uuid, value); > +}

[PATCH v2] vhost-user: fix shared object return values

2024-10-22 Thread Albert Esteve
: Stefano Garzarella Signed-off-by: Albert Esteve --- hw/virtio/vhost-user.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index 00561daa06..96c5e6b95f 100644 --- a/hw/virtio/vhost-user.c +++ b/hw/virtio/vhost

Re: [PATCH] vhost-user: fix shared object return values

2024-10-21 Thread Albert Esteve
On Thu, Oct 17, 2024 at 11:38 AM Stefano Garzarella wrote: > > On Thu, Oct 17, 2024 at 10:27:30AM +0200, Albert Esteve wrote: > >Albert Esteve > > > >Senior Software Engineer > > > >Red Hat > > > >aest...@redhat.com > > > > > >

Re: [PATCH] vhost-user: fix shared object return values

2024-10-17 Thread Albert Esteve
On Thu, Oct 17, 2024 at 11:18 AM Daniel P. Berrangé wrote: > > On Thu, Oct 17, 2024 at 11:12:32AM +0200, Albert Esteve wrote: > > On Thu, Oct 17, 2024 at 10:44 AM Daniel P. Berrangé > > wrote: > > > > > > On Wed, Oct 16, 2024 at 1

Re: [PATCH] vhost-user: fix shared object return values

2024-10-17 Thread Albert Esteve
On Thu, Oct 17, 2024 at 10:44 AM Daniel P. Berrangé wrote: > > On Wed, Oct 16, 2024 at 11:06:06AM +0200, Albert Esteve wrote: > > VHOST_USER_BACKEND_SHARED_OBJECT_ADD and > > VHOST_USER_BACKEND_SHARED_OBJECT_REMOVE state > > in the spec that they return 0 for successful

Re: [PATCH] vhost-user: fix shared object return values

2024-10-17 Thread Albert Esteve
Albert Esteve Senior Software Engineer Red Hat aest...@redhat.com On Thu, Oct 17, 2024 at 9:38 AM Stefano Garzarella wrote: > > On Wed, Oct 16, 2024 at 11:06:06AM +0200, Albert Esteve wrote: > >VHOST_USER_BACKEND_SHARED_OBJECT_ADD and > >VHOST_USER_BACKEND_SHARED_OBJECT_

[PATCH] vhost-user: fix shared object return values

2024-10-16 Thread Albert Esteve
: Albert Esteve --- hw/virtio/vhost-user.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index 00561daa06..90917352a4 100644 --- a/hw/virtio/vhost-user.c +++ b/hw/virtio/vhost-user.c @@ -1607,7 +1607,7

Re: [PATCH v3 0/5] vhost-user: Add SHMEM_MAP/UNMAP requests

2024-09-17 Thread Albert Esteve
On Mon, Sep 16, 2024 at 7:57 PM Stefan Hajnoczi wrote: > This patch series could use tests. The first two patches seem broken and > testing would have revealed that the memory allocation and pointers are > not quite right. > My bad. Previous version of the patch I did test with a device that I'v

Re: [PATCH v3 0/5] vhost-user: Add SHMEM_MAP/UNMAP requests

2024-09-12 Thread Albert Esteve
Link to the documentation: https://lore.kernel.org/all/20240912144432.126717-1-aest...@redhat.com/T/#t On Thu, Sep 12, 2024 at 4:53 PM Albert Esteve wrote: > Hi all, > > v2->v3: > - Add track for mapped memory in VIRTIO > Shared memory regions, so that boundaries > c

Re: [PATCH 0/3] Document SHMEM vhost-user requests

2024-09-12 Thread Albert Esteve
Link to the implementation: https://lore.kernel.org/all/20240912145335.129447-1-aest...@redhat.com/T/#t On Thu, Sep 12, 2024 at 4:44 PM Albert Esteve wrote: > As a continuation of the > "Add SHMEM_MAP/UNMAP requests" patch [1], > I wanted to split vhost-user spec > parts

[PATCH v3 3/5] vhost_user: Add frontend command for shmem config

2024-09-12 Thread Albert Esteve
`vhost-user-device` case. Signed-off-by: Albert Esteve --- hw/virtio/vhost-user.c| 45 +++ include/hw/virtio/vhost-backend.h | 6 + include/hw/virtio/vhost-user.h| 1 + 3 files changed, 52 insertions(+) diff --git a/hw/virtio/vhost-user.c b/hw

[PATCH v3 2/5] virtio: Track shared memory mappings

2024-09-12 Thread Albert Esteve
Update shmem_list to be able to track active mappings on VIRTIO shared memory regions. This allows to verify that new mapping request received from backends do not overlap. If they do, the request shall fail in order to adhere to the specs. Signed-off-by: Albert Esteve --- hw/virtio/vhost

[PATCH v3 4/5] vhost-user-dev: Add cache BAR

2024-09-12 Thread Albert Esteve
VHOST_USER_PROTOCOL_F_SHMEM feature is not supported by the backend, there is no cache. Signed-off-by: Albert Esteve --- hw/virtio/vhost-user-base.c | 37 +++-- hw/virtio/vhost-user-device-pci.c | 39 --- 2 files changed, 71 insertions(+), 5

[PATCH v3 5/5] vhost_user: Add MEM_READ/WRITE backend requests

2024-09-12 Thread Albert Esteve
/WRITE requests have flexible array members, since we do not know in advance the number of bytes in the mapped region. Therefore, we need to allow bigger message sizes for these types, and ensure we allocate sufficient memory for them. Signed-off-by: Albert Esteve --- hw/virtio/vhost-user.c

[PATCH v3 0/5] vhost-user: Add SHMEM_MAP/UNMAP requests

2024-09-12 Thread Albert Esteve
ing a descriptor that references a mapping to another backend. The first backend will not be able to see these mappings. So these requests are a fallback for vhost-user memory translation fails. Albert Esteve (5): vhost-user: Add VIRTIO Shared Memory map request virtio: Track shared mem

[PATCH v3 1/5] vhost-user: Add VIRTIO Shared Memory map request

2024-09-12 Thread Albert Esteve
space. The device model needs to create MemoryRegion instances for the VIRTIO Shared Memory Regions and add them to the `VirtIODevice` instance. Signed-off-by: Albert Esteve --- hw/virtio/vhost-user.c| 122 ++ hw/virtio/virtio.c| 13

[PATCH 0/3] Document SHMEM vhost-user requests

2024-09-12 Thread Albert Esteve
ir systems. This is such documentation-only patch. [1] - https://lore.kernel.org/all/20240628145710.1516121-1-aest...@redhat.com/T/ Albert Esteve (3): vhost_user.rst: Add SHMEM_MAP/_UNMAP to spec vhost_user.rst: Align VhostUserMsg excerpt members vhost_user.rst: Add GET_SHMEM_CONFIG mess

[PATCH 3/3] vhost_user.rst: Add GET_SHMEM_CONFIG message

2024-09-12 Thread Albert Esteve
Add GET_SHMEM_CONFIG vhost-user frontend message to the spec documentation. Signed-off-by: Albert Esteve --- docs/interop/vhost-user.rst | 39 + 1 file changed, 39 insertions(+) diff --git a/docs/interop/vhost-user.rst b/docs/interop/vhost-user.rst index

[PATCH 1/3] vhost_user.rst: Add SHMEM_MAP/_UNMAP to spec

2024-09-12 Thread Albert Esteve
Add SHMEM_MAP/_UNMAP request to the vhost-user spec documentation. Signed-off-by: Albert Esteve --- docs/interop/vhost-user.rst | 31 +++ 1 file changed, 31 insertions(+) diff --git a/docs/interop/vhost-user.rst b/docs/interop/vhost-user.rst index d8419fd2f1

[PATCH 2/3] vhost_user.rst: Align VhostUserMsg excerpt members

2024-09-12 Thread Albert Esteve
Add missing VhostUserShared and VhostUserTransferDeviceState members to the VhostUserMsg excerpt in the vhost-user spec documentation. Signed-off-by: Albert Esteve --- docs/interop/vhost-user.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/interop/vhost-user.rst b/docs/interop

Re: [RFC PATCH v2 1/5] vhost-user: Add VIRTIO Shared Memory map request

2024-09-11 Thread Albert Esteve
On Thu, Sep 5, 2024 at 6:45 PM Stefan Hajnoczi wrote: > On Tue, Sep 03, 2024 at 01:54:12PM +0200, Albert Esteve wrote: > > On Tue, Sep 3, 2024 at 11:54 AM Albert Esteve > wrote: > > > > > > > > > > > On Thu, Jul 11, 2024 at 9:45 AM Stefan Hajnoczi &

Re: [RFC PATCH v2 5/5] vhost_user: Implement mem_read/mem_write handlers

2024-09-10 Thread Albert Esteve
On Thu, Sep 5, 2024 at 9:18 PM Stefan Hajnoczi wrote: > On Wed, Sep 04, 2024 at 03:01:06PM +0200, Albert Esteve wrote: > > On Thu, Jul 11, 2024 at 10:55 AM Stefan Hajnoczi > > wrote: > > > > > On Fri, Jun 28, 2024 at 04:57:10PM +0200, Albert Esteve wrote: > >

Re: [RFC PATCH v2 0/5] vhost-user: Add SHMEM_MAP/UNMAP requests

2024-09-06 Thread Albert Esteve
On Thu, Sep 5, 2024 at 6:39 PM Stefan Hajnoczi wrote: > On Tue, Sep 03, 2024 at 10:42:34AM +0200, Albert Esteve wrote: > > Hello all, > > > > Sorry, I have been a bit disconnected from this thread as I was on > > vacations and then had to switch tasks for a whil

Re: [RFC PATCH v2 5/5] vhost_user: Implement mem_read/mem_write handlers

2024-09-04 Thread Albert Esteve
On Thu, Jul 11, 2024 at 10:55 AM Stefan Hajnoczi wrote: > On Fri, Jun 28, 2024 at 04:57:10PM +0200, Albert Esteve wrote: > > Implement function handlers for memory read and write > > operations. > > > > Signed-off-by: Albert Esteve > > ---

Re: [RFC PATCH v2 3/5] vhost-user-dev: Add cache BAR

2024-09-04 Thread Albert Esteve
On Thu, Jul 11, 2024 at 10:25 AM Stefan Hajnoczi wrote: > On Fri, Jun 28, 2024 at 04:57:08PM +0200, Albert Esteve wrote: > > Add a cache BAR in the vhost-user-device > > into which files can be directly mapped. > > > > The number, shmid, and size of the VIRTIO Shar

Re: [RFC PATCH v2 2/5] vhost_user: Add frontend command for shmem config

2024-09-04 Thread Albert Esteve
On Thu, Jul 11, 2024 at 10:10 AM Stefan Hajnoczi wrote: > On Fri, Jun 28, 2024 at 04:57:07PM +0200, Albert Esteve wrote: > > The frontend can use this command to retrieve > > VIRTIO Shared Memory Regions configuration from > > the backend. The response contains the number

Re: [RFC PATCH v2 1/5] vhost-user: Add VIRTIO Shared Memory map request

2024-09-04 Thread Albert Esteve
On Thu, Jul 11, 2024 at 9:45 AM Stefan Hajnoczi wrote: > On Fri, Jun 28, 2024 at 04:57:06PM +0200, Albert Esteve wrote: > > Add SHMEM_MAP/UNMAP requests to vhost-user to > > handle VIRTIO Shared Memory mappings. > > > > This request allows backends to dynamically map &

Re: [RFC PATCH v2 1/5] vhost-user: Add VIRTIO Shared Memory map request

2024-09-03 Thread Albert Esteve
On Tue, Sep 3, 2024 at 11:54 AM Albert Esteve wrote: > > > On Thu, Jul 11, 2024 at 9:45 AM Stefan Hajnoczi > wrote: > >> On Fri, Jun 28, 2024 at 04:57:06PM +0200, Albert Esteve wrote: >> > Add SHMEM_MAP/UNMAP requests to vhost-user to >> > handle VIRTIO

Re: [RFC PATCH v2 1/5] vhost-user: Add VIRTIO Shared Memory map request

2024-09-03 Thread Albert Esteve
On Thu, Jul 11, 2024 at 9:45 AM Stefan Hajnoczi wrote: > On Fri, Jun 28, 2024 at 04:57:06PM +0200, Albert Esteve wrote: > > Add SHMEM_MAP/UNMAP requests to vhost-user to > > handle VIRTIO Shared Memory mappings. > > > > This request allows backends to dynamically map &

Re: [RFC PATCH v2 0/5] vhost-user: Add SHMEM_MAP/UNMAP requests

2024-09-03 Thread Albert Esteve
Hello all, Sorry, I have been a bit disconnected from this thread as I was on vacations and then had to switch tasks for a while. I will try to go through all comments and address them for the first non-RFC drop of this patch series. But I was discussing with some colleagues on this. So turns ou

[RFC PATCH v2 2/5] vhost_user: Add frontend command for shmem config

2024-06-28 Thread Albert Esteve
`vhost-user-device` case. Signed-off-by: Albert Esteve --- docs/interop/vhost-user.rst | 31 +++ hw/virtio/vhost-user.c| 42 +++ include/hw/virtio/vhost-backend.h | 6 + include/hw/virtio/vhost-user.h| 1 + 4 files

[RFC PATCH v2 4/5] vhost_user: Add MEM_READ/WRITE backend requests

2024-06-28 Thread Albert Esteve
-by: Albert Esteve --- hw/virtio/vhost-user.c| 31 + subprojects/libvhost-user/libvhost-user.c | 84 +++ subprojects/libvhost-user/libvhost-user.h | 38 ++ 3 files changed, 153 insertions(+) diff --git a/hw/virtio/vhost-user.c b/hw/virtio

[RFC PATCH v2 5/5] vhost_user: Implement mem_read/mem_write handlers

2024-06-28 Thread Albert Esteve
Implement function handlers for memory read and write operations. Signed-off-by: Albert Esteve --- hw/virtio/vhost-user.c | 34 ++ 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index 18cacb2d68

[RFC PATCH v2 0/5] vhost-user: Add SHMEM_MAP/UNMAP requests

2024-06-28 Thread Albert Esteve
ils. Albert Esteve (5): vhost-user: Add VIRTIO Shared Memory map request vhost_user: Add frontend command for shmem config vhost-user-dev: Add cache BAR vhost_user: Add MEM_READ/WRITE backend requests vhost_user: Implement mem_read/mem_write handlers docs/interop/vhost-user.

[RFC PATCH v2 3/5] vhost-user-dev: Add cache BAR

2024-06-28 Thread Albert Esteve
VHOST_USER_PROTOCOL_F_SHMEM feature is not supported by the backend, there is no cache. Signed-off-by: Albert Esteve --- hw/virtio/vhost-user-base.c | 39 +-- hw/virtio/vhost-user-device-pci.c | 37 ++--- 2 files changed, 71 insertions(+), 5

[RFC PATCH v2 1/5] vhost-user: Add VIRTIO Shared Memory map request

2024-06-28 Thread Albert Esteve
space. The device model needs to create MemoryRegion instances for the VIRTIO Shared Memory Regions and add them to the `VirtIODevice` instance. Signed-off-by: Albert Esteve --- docs/interop/vhost-user.rst | 27 + hw/virtio/vhost-user.c| 122

Re: [RFC PATCH 1/1] vhost-user: add shmem mmap request

2024-06-26 Thread Albert Esteve
Hi Stefan, On Wed, Jun 5, 2024 at 4:28 PM Stefan Hajnoczi wrote: > On Wed, Jun 05, 2024 at 10:13:32AM +0200, Albert Esteve wrote: > > On Tue, Jun 4, 2024 at 8:54 PM Stefan Hajnoczi > wrote: > > > > > On Thu, May 30, 2024 at 05:22:23PM +0200, Albert Esteve wrote:

Re: [RFC PATCH 0/1] vhost-user: Add SHMEM_MAP/UNMAP requests

2024-06-05 Thread Albert Esteve
On Wed, Jun 5, 2024 at 1:16 PM Stefan Hajnoczi wrote: > On Wed, Jun 05, 2024 at 09:24:36AM +0200, Albert Esteve wrote: > > On Tue, Jun 4, 2024 at 8:16 PM Stefan Hajnoczi > wrote: > > > > > On Thu, May 30, 2024 at 05:22:22PM +0200, Albert Esteve wrote: > > >

Re: [RFC PATCH 1/1] vhost-user: add shmem mmap request

2024-06-05 Thread Albert Esteve
On Tue, Jun 4, 2024 at 8:54 PM Stefan Hajnoczi wrote: > On Thu, May 30, 2024 at 05:22:23PM +0200, Albert Esteve wrote: > > Add SHMEM_MAP/UNMAP requests to vhost-user. > > > > This request allows backends to dynamically map > > fds into a shared memory region indentif

Re: [RFC PATCH 0/1] vhost-user: Add SHMEM_MAP/UNMAP requests

2024-06-05 Thread Albert Esteve
On Tue, Jun 4, 2024 at 8:16 PM Stefan Hajnoczi wrote: > On Thu, May 30, 2024 at 05:22:22PM +0200, Albert Esteve wrote: > > Hi all, > > > > This is an early attempt to have backends > > support dynamic fd mapping into shared > > memory regions. As such, the

[RFC PATCH 0/1] vhost-user: Add SHMEM_MAP/UNMAP requests

2024-05-30 Thread Albert Esteve
regions to the list, so that the devices can use them. But I wanted to gather some feedback before refining it further, as I am probably missing some required steps/or security concerns that I am not taking into account. Albert Esteve (1): vhost-user: add shmem mmap request docs/interop/vhost

[RFC PATCH 1/1] vhost-user: add shmem mmap request

2024-05-30 Thread Albert Esteve
: Albert Esteve --- docs/interop/vhost-user.rst | 23 hw/virtio/vhost-user.c | 106 hw/virtio/virtio.c | 2 + include/hw/virtio/virtio.h | 3 + 4 files changed, 134 insertions(+) diff --git a/docs/interop/vhost-user.rst b/docs/interop

Re: [PATCH v4 0/5] Virtio dmabuf improvements

2024-03-13 Thread Albert Esteve
On Tue, Mar 12, 2024 at 7:23 PM Michael S. Tsirkin wrote: > On Mon, Feb 19, 2024 at 03:34:18PM +0100, Albert Esteve wrote: > > v1: https://www.mail-archive.com/qemu-devel@nongnu.org/msg1005257.html > > v2: https://www.mail-archive.com/qemu-devel@nongnu.org/msg1014615.html > &

Re: [PATCH v4 3/5] hw/virtio: change dmabuf mutex to QemuMutex

2024-03-11 Thread Albert Esteve
unction and call it from > >virtio.c, each time a new backend structure > >is initialised. > > > >Signed-off-by: Albert Esteve > >--- > > hw/display/virtio-dmabuf.c| 55 +-- > > hw/virtio/virtio.c| 3 +

Re: [PATCH v4 2/5] hw/virtio: document SharedObject structures

2024-03-06 Thread Albert Esteve
On Tue, Feb 20, 2024 at 11:34 AM Manos Pitsidianakis < manos.pitsidiana...@linaro.org> wrote: > On Mon, 19 Feb 2024 16:34, Albert Esteve wrote: > >Change VirtioSharedObject value type from > >a generic pointer to a union storing the different > >supported underlyin

[PATCH v4 4/5] hw/virtio: cleanup shared resources

2024-02-19 Thread Albert Esteve
parameter. Also, add a test to verify that the new function in the API behaves as expected. Signed-off-by: Albert Esteve Acked-by: Stefan Hajnoczi --- hw/display/virtio-dmabuf.c| 21 hw/virtio/vhost.c | 3 +++ include/hw/virtio/virtio-dmabuf.h | 10

[PATCH v4 3/5] hw/virtio: change dmabuf mutex to QemuMutex

2024-02-19 Thread Albert Esteve
: Albert Esteve --- hw/display/virtio-dmabuf.c| 55 +-- hw/virtio/virtio.c| 3 ++ include/hw/virtio/virtio-dmabuf.h | 5 +++ tests/unit/test-virtio-dmabuf.c | 5 +++ 4 files changed, 43 insertions(+), 25 deletions(-) diff --git a/hw/display

[PATCH v4 2/5] hw/virtio: document SharedObject structures

2024-02-19 Thread Albert Esteve
Change VirtioSharedObject value type from a generic pointer to a union storing the different supported underlying types, which makes naming less confusing. With the update, use the chance to add kdoc to both the SharedObjectType enum and VirtioSharedObject struct. Signed-off-by: Albert Esteve

[PATCH v4 5/5] hw/virtio: rename virtio dmabuf API

2024-02-19 Thread Albert Esteve
Functions in the virtio-dmabuf module start with 'virtio_*', which is too generic and may not correctly identify them as part of the virtio dmabuf API. Rename all functions to 'virtio_dmabuf_*' instead to avoid confusion. Signed-off-by: Albert Esteve Acked-by: Stefan H

[PATCH v4 1/5] hw/virtio: check owner for removing objects

2024-02-19 Thread Albert Esteve
the table. To fix that, add a check for all *SHARED_OBJECT_REMOVE messages received. A vhost device can only remove TYPE_VHOST_DEV entries that are owned by them, otherwise skip the removal, and inform the device that the entry has not been removed in the answer. Signed-off-by: Albert Esteve

[PATCH v4 0/5] Virtio dmabuf improvements

2024-02-19 Thread Albert Esteve
ame virtio dmabuf functions to `virtio_dmabuf_*` Albert Esteve (5): hw/virtio: check owner for removing objects hw/virtio: document SharedObject structures hw/virtio: change dmabuf mutex to QemuMutex hw/virtio: cleanup shared resources hw/virtio: rename virtio dmabuf API docs/interop/vh

Re: [PATCH v3 2/3] hw/virtio: cleanup shared resources

2024-02-19 Thread Albert Esteve
On Mon, Feb 19, 2024 at 11:45 AM Albert Esteve wrote: > > > > On Thu, Feb 15, 2024 at 10:45 AM Albert Esteve wrote: > >> >> >> On Tue, Feb 6, 2024 at 12:11 AM Alex Bennée >> wrote: >> >>> Albert Esteve writes: >>> >>> &

Re: [PATCH v3 2/3] hw/virtio: cleanup shared resources

2024-02-19 Thread Albert Esteve
On Thu, Feb 15, 2024 at 10:45 AM Albert Esteve wrote: > > > On Tue, Feb 6, 2024 at 12:11 AM Alex Bennée > wrote: > >> Albert Esteve writes: >> >> > Ensure that we cleanup all virtio shared >> > resources when the vhost devices is cleaned >>

Re: [PATCH v3 2/3] hw/virtio: cleanup shared resources

2024-02-15 Thread Albert Esteve
On Tue, Feb 6, 2024 at 12:11 AM Alex Bennée wrote: > Albert Esteve writes: > > > Ensure that we cleanup all virtio shared > > resources when the vhost devices is cleaned > > up (after a hot unplug, or a crash). > > > > To do so, we add a new function

Re: [PATCH v3 1/3] hw/virtio: check owner for removing objects

2024-02-15 Thread Albert Esteve
On Mon, Feb 5, 2024 at 1:57 PM Alex Bennée wrote: > Albert Esteve writes: > > > Shared objects lack spoofing protection. > > For VHOST_USER_BACKEND_SHARED_OBJECT_REMOVE messages > > received by the vhost-user interface, any backend was > > allowed to remove entr

Re: [PATCH v3 0/3] Virtio dmabuf improvements

2024-02-05 Thread Albert Esteve
Friendly reminder & bump Is this series waiting to be picked up, or is there anything left to do? BR, Albert On Tue, Jan 9, 2024 at 1:56 PM Albert Esteve wrote: > v1: https://www.mail-archive.com/qemu-devel@nongnu.org/msg1005257.html > v2: https://www.mail-archive.com/qemu-devel@

[PATCH v3 1/3] hw/virtio: check owner for removing objects

2024-01-09 Thread Albert Esteve
the table. To fix that, add a check for all *SHARED_OBJECT_REMOVE messages received. A vhost device can only remove TYPE_VHOST_DEV entries that are owned by them, otherwise skip the removal, and inform the device that the entry has not been removed in the answer. Signed-off-by: Albert Esteve

[PATCH v3 3/3] hw/virtio: rename virtio dmabuf API

2024-01-09 Thread Albert Esteve
Functions in the virtio-dmabuf module start with 'virtio_*', which is too generic and may not correctly identify them as part of the virtio dmabuf API. Rename all functions to 'virtio_dmabuf_*' instead to avoid confusion. Signed-off-by: Albert Esteve Acked-by: Stefan Hajno

[PATCH v3 2/3] hw/virtio: cleanup shared resources

2024-01-09 Thread Albert Esteve
parameter. Also, add a test to verify that the new function in the API behaves as expected. Signed-off-by: Albert Esteve Acked-by: Stefan Hajnoczi --- hw/display/virtio-dmabuf.c| 22 + hw/virtio/vhost.c | 3 +++ include/hw/virtio/virtio-dmabuf.h

[PATCH v3 0/3] Virtio dmabuf improvements

2024-01-09 Thread Albert Esteve
the virtio-dmabuf module. This patch includes: - Check for ownership before allowing a vhost device to remove an object from the table. - Properly cleanup shared resources if a vhost device object gets cleaned up. - Rename virtio dmabuf functions to `virtio_dmabuf_*` Albert Esteve (3): hw/vir

Re: [PATCH v2 0/3] Virtio dmabuf improvements

2024-01-08 Thread Albert Esteve
On Mon, Dec 11, 2023 at 10:48 PM Stefan Hajnoczi wrote: > On Thu, 7 Dec 2023 at 09:55, Albert Esteve wrote: > > > > v1: https://www.mail-archive.com/qemu-devel@nongnu.org/msg1005257.html > > v1 -> v2: > > - Solved an unitialized uuid value on vhost-user source &g

Re: [PATCH v2 3/3] hw/virtio: rename virtio dmabuf API

2023-12-07 Thread Albert Esteve
On Thu, Dec 7, 2023 at 3:55 PM Albert Esteve wrote: > Functions in the virtio-dmabuf module > start with 'virtio_*', which is too > generic and may not correctly identify > them as part of the virtio dmabuf API. > > Rename all functions to 'virtio_dmabu

[PATCH v2 3/3] hw/virtio: rename virtio dmabuf API

2023-12-07 Thread Albert Esteve
Functions in the virtio-dmabuf module start with 'virtio_*', which is too generic and may not correctly identify them as part of the virtio dmabuf API. Rename all functions to 'virtio_dmabuf_*' instead to avoid confusion. Signed-off-by: Albert Esteve --- hw/display/virtio-

  1   2   3   >