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 dynamically map > > fds into a VIRTIO Shared

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

2025-02-20 Thread Alyssa Ross
Albert Esteve writes: > @@ -192,6 +194,24 @@ typedef struct VhostUserShared { > unsigned char uuid[16]; > } VhostUserShared; > > +/* For the flags field of VhostUserMMap */ > +#define VHOST_USER_FLAG_MAP_R (1u << 0) > +#define VHOST_USER_FLAG_MAP_W (1u << 1) > + > +typedef struct { > +

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 dynamically map > > fds into a VIRTIO Shared

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

2025-02-18 Thread Stefan Hajnoczi
On Mon, Feb 17, 2025 at 05:40:04PM +0100, Albert Esteve wrote: > diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c > index 85110bce37..47d0ddb820 100644 > --- a/hw/virtio/virtio.c > +++ b/hw/virtio/virtio.c > @@ -3063,6 +3063,75 @@ int virtio_save(VirtIODevice *vdev, QEMUFile *f) > return v

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

2025-02-17 Thread Stefan Hajnoczi
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 dynamically map > fds into a VIRTIO Shared Memory Region indentified > by its `shmid`. The map is performed by

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

2025-02-17 Thread Albert Esteve
Add SHMEM_MAP/UNMAP requests to vhost-user to handle VIRTIO Shared Memory mappings. This request allows backends to dynamically map fds into a VIRTIO Shared Memory Region indentified by its `shmid`. The map is performed by calling `memory_region_init_ram_from_fd` and adding the new region as a sub