Re: [PATCH] block: temporarily hold the new AioContext of bs_top in bdrv_append()

2023-02-14 Thread Stefano Garzarella
On Tue, Feb 14, 2023 at 12:56 PM Kevin Wolf wrote: > > Am 14.02.2023 um 11:51 hat Stefano Garzarella geschrieben: > > bdrv_append() is called with bs_top AioContext held, but > > bdrv_attach_child_noperm() could change the AioContext of bs_top. > > > > bd

Re: [PATCH] block: temporarily hold the new AioContext of bs_top in bdrv_append()

2023-02-14 Thread Stefano Garzarella
On Tue, Feb 14, 2023 at 3:06 PM Kevin Wolf wrote: > > Am 14.02.2023 um 13:22 hat Stefano Garzarella geschrieben: > > On Tue, Feb 14, 2023 at 12:56 PM Kevin Wolf wrote: > > > > > > Am 14.02.2023 um 11:51 hat Stefano Garzarella geschrieben: > > > > bdrv

[PATCH v2] block: temporarily hold the new AioContext of bs_top in bdrv_append()

2023-02-14 Thread Stefano Garzarella
egin() can call BDRV_POLL_WHILE that assumes the new lock is taken, so let's temporarily hold the new AioContext to prevent QEMU from failing in BDRV_POLL_WHILE when it tries to release the wrong AioContext. Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2168209 Reported-by: Aihua Liang Si

Re: Call for GSoC and Outreachy project ideas for summer 2023

2023-02-17 Thread Stefano Garzarella
1-andra...@amazon.com/ VMADDR_FLAG_TO_HOST flag support in Linux] '''Details:''' * Project size: 350 hours * Skill level: intermediate (knowledge of Rust and virtualization) * Language: Rust * Mentor: Stefano Garzarella ** IRC: sgarzare / Matrix: @sgarzare:matrix.org * Suggested by: Stefano Garzarella

Re: Call for GSoC and Outreachy project ideas for summer 2023

2023-02-17 Thread Stefano Garzarella
On Fri, Feb 17, 2023 at 11:53:03AM -0500, Stefan Hajnoczi wrote: On Fri, 17 Feb 2023 at 11:23, Stefano Garzarella wrote: Hi Stefan, On Fri, Jan 27, 2023 at 10:17:40AM -0500, Stefan Hajnoczi wrote: >Dear QEMU, KVM, and rust-vmm communities, >QEMU will apply for Google Summer of Cod

Re: [RFC PATCH v2 00/25] Virtio Sound card Implementation

2023-02-22 Thread Stefano Garzarella
Hi Shreyansh, On Fri, Feb 11, 2022 at 11:18 PM Shreyansh Chouhan wrote: > > The second RFC for implementing the VirtIO Sound card as described in > the virtio specs. Sorry for the absence of activity on this. Thanks for starting working on virtio-sound device for QEMU! I'm interested in completi

Re: [PATCH] block/blkio: Make driver nvme-io_uring take a "path" instead of a "filename"

2022-11-02 Thread Stefano Garzarella
On Sat, Oct 29, 2022 at 12:38:54AM +0100, Alberto Faria wrote: The nvme-io_uring driver expects a character special file such as /dev/ng0n1. Follow the convention of having a "filename" option when a regular file is expected, and a "path" option otherwise. This makes io_uring the only libblkio-b

Re: Issue with VDUSE (QSD vduse-blk export) and vhost-vdpa

2022-11-03 Thread Stefano Garzarella
On Wed, Oct 26, 2022 at 12:17 PM Stefano Garzarella wrote: > > On Wed, Oct 26, 2022 at 05:39:23PM +0800, Yongji Xie wrote: > >Hi Stefano, > > > >On Wed, Oct 26, 2022 at 5:12 PM Stefano Garzarella > >wrote: > >> > >> Hi Xie, > >> I was te

Re: [PATCH v8 5/5] docs: Add generic vhost-vdpa device documentation

2022-11-08 Thread Stefano Garzarella
On Tue, Nov 08, 2022 at 11:30:53AM +0800, Longpeng (Mike, Cloud Infrastructure Service Product Dept.) wrote: 在 2022/11/8 10:42, Jason Wang 写道: On Tue, Nov 8, 2022 at 8:42 AM Longpeng(Mike) wrote: From: Longpeng Signed-off-by: Longpeng --- docs/system/devices/vhost-vdpa-device.rst | 43

Re: [PATCH v8 4/5] vdpa-dev: mark the device as unmigratable

2022-11-08 Thread Stefano Garzarella
cular reason why we don't squash this change in the second patch of this series where we add the hw/virtio/vdpa-dev.c file? Anyway, this change LGTM: Reviewed-by: Stefano Garzarella diff --git a/hw/virtio/vdpa-dev.c b/hw/virtio/vdpa-dev.c index 2885d06cbe..62d83d3423 100644 --- a/hw/v

Re: [PATCH] qapi/block-core: Fix BlockdevOptionsNvmeIoUring @path description

2022-11-09 Thread Stefano Garzarella
On Tue, Nov 08, 2022 at 02:23:47PM +, Alberto Faria wrote: The nvme-io_uring BlockDriver's path option must point at the character device of an NVMe namespace, not at an image file. Fixes: fd66dbd424f5 ("blkio: add libblkio block driver") Suggested-by: Stefano Garzarella

Re: [PATCH v2 4/5] pci-ids: drop PCI_DEVICE_ID_VIRTIO_VSOCK

2022-10-04 Thread Stefano Garzarella
Hi Gerd, On Fri, Sep 30, 2022 at 03:58:09PM +0200, Gerd Hoffmann wrote: Not needed for a virtio 1.0 device. Signed-off-by: Gerd Hoffmann --- include/hw/pci/pci.h | 1 - hw/virtio/vhost-user-vsock-pci.c | 2 -- hw/virtio/vhost-vsock-pci.c | 2 -- 3 files changed, 5 deletions(-) d

Re: [PATCH v5 00/12] blkio: add libblkio BlockDriver

2022-10-06 Thread Stefano Garzarella
Hi Stefan, I tested this series with the vDPA block simulator in Linux v6.0. It worked well, but I had a segfault when blkio_map_mem_region() fails. In my case, it failed because I forgot to increase the `memlock` limit with `ulimit -l unlimited` since the simulator still requires locking all th

Re: [OUTREACHY] Asking about contribution ideas

2022-10-24 Thread Stefano Garzarella
Hi Wilberforce, On Sat, Oct 22, 2022 at 7:58 PM NSENGIYUMVA WILBERFORCE wrote: > > Hi team, > I am an outreachy applicant and I would like to know how I can make my > first contribution and what the contribution should be. Great, did you take a look at https://wiki.qemu.org/Contribute/BiteSizedT

Re: Issue with VDUSE (QSD vduse-blk export) and vhost-vdpa

2022-10-26 Thread Stefano Garzarella
On Wed, Oct 26, 2022 at 05:39:23PM +0800, Yongji Xie wrote: Hi Stefano, On Wed, Oct 26, 2022 at 5:12 PM Stefano Garzarella wrote: Hi Xie, I was testing libblkio [1] with QSD vduse-blk export and had some issues. In a nutshell, QSD prints me the following messages when using vhost-vdpa to

Re: [PATCH 1/2] linux-aio: fix unbalanced plugged counter in laio_io_unplug()

2022-06-09 Thread Stefano Garzarella
() and laio_io_unplug() calls accurately. Otherwise I/O stalls occur since io_submit(2) calls are skipped while plugged. We can add a Fixes tag: Fixes: 68d7946648 ("linux-aio: add `dev_max_batch` parameter to laio_io_unplug()") Reported-by: Nikolay Tenev Cc: Stefano Garzarella Sig

Re: [PATCH 2/2] linux-aio: explain why max batch is checked in laio_io_unplug()

2022-06-09 Thread Stefano Garzarella
On Thu, Jun 09, 2022 at 05:47:12PM +0100, Stefan Hajnoczi wrote: It may not be obvious why laio_io_unplug() checks max batch. I discussed this with Stefano and have added a comment summarizing the reason. Cc: Stefano Garzarella Cc: Kevin Wolf Signed-off-by: Stefan Hajnoczi --- block/linux

Re: [PATCH 1/2] include/hw/virtio: Break inclusion loop

2022-12-12 Thread Stefano Garzarella
- hw/virtio/virtio.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefano Garzarella diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index a973811cbf..8b68b69e00 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -22,7

Re: [PATCH v10 5/5] docs: Add generic vhost-vdpa device documentation

2022-12-13 Thread Stefano Garzarella
On Mon, Dec 05, 2022 at 04:49:43PM +0800, Longpeng(Mike) wrote: From: Longpeng Signed-off-by: Longpeng --- .../devices/vhost-vdpa-generic-device.rst | 66 +++ 1 file changed, 66 insertions(+) create mode 100644 docs/system/devices/vhost-vdpa-generic-device.rst diff --git a/

Re: [PATCH v10 5/5] docs: Add generic vhost-vdpa device documentation

2022-12-13 Thread Stefano Garzarella
On Tue, Dec 13, 2022 at 11:37:35PM +0800, Longpeng (Mike, Cloud Infrastructure Service Product Dept.) wrote: 在 2022/12/13 22:35, Stefano Garzarella 写道: On Mon, Dec 05, 2022 at 04:49:43PM +0800, Longpeng(Mike) wrote: From: Longpeng Signed-off-by: Longpeng --- .../devices/vhost-vdpa

Re: [Bug Report] Possible Missing Endianness Conversion

2024-06-24 Thread Stefano Garzarella
CCing Jason. On Mon, Jun 24, 2024 at 4:30 PM Xoykie wrote: > > The virtio packed virtqueue support patch[1] suggests converting > endianness by lines: > > virtio_tswap16s(vdev, &e->off_wrap); > virtio_tswap16s(vdev, &e->flags); > > Though both of these conversion statements aren't present in the

Re: [Bug Report] Possible Missing Endianness Conversion

2024-06-25 Thread Stefano Garzarella
On Mon, Jun 24, 2024 at 04:19:52PM GMT, Peter Maydell wrote: On Mon, 24 Jun 2024 at 16:11, Stefano Garzarella wrote: CCing Jason. On Mon, Jun 24, 2024 at 4:30 PM Xoykie wrote: > > The virtio packed virtqueue support patch[1] suggests converting > endianness by lines: > >

Re: [PATCH] qapi/qom: make some QOM properties depend on the build settings

2024-06-25 Thread Stefano Garzarella
Gentle ping :-) On Tue, Jun 04, 2024 at 03:59:31PM GMT, Stefano Garzarella wrote: Some QOM properties are associated with ObjectTypes that already depend on CONFIG_* switches. So to avoid generating dead code, let's also make the definition of those properties dependent on the correspo

Re: [PATCH v3 03/15] backends/igvm: Add IGVM loader and configuration

2024-06-27 Thread Stefano Garzarella
On Fri, Jun 21, 2024 at 03:29:06PM GMT, Roy Hopkins wrote: Adds an IGVM loader to QEMU which processes a given IGVM file and applies the directives within the file to the current guest configuration. The IGVM loader can be used to configure both confidential and non-confidential guests. For conf

Re: [PATCH v3 05/15] i386/pc_sysfw: Ensure sysfw flash configuration does not conflict with IGVM

2024-06-27 Thread Stefano Garzarella
On Fri, Jun 21, 2024 at 03:29:08PM GMT, Roy Hopkins wrote: When using an IGVM file the configuration of the system firmware is defined by IGVM directives contained in the file. In this case the user should not configure any pflash devices. This commit skips initialization of the ROM mode when pf

Re: [PATCH v3 06/15] sev: Update launch_update_data functions to use Error handling

2024-06-27 Thread Stefano Garzarella
On Fri, Jun 21, 2024 at 03:29:09PM GMT, Roy Hopkins wrote: The class function and implementations for updating launch data return a code in case of error. In some cases an error message is generated and in other cases, just the error return value is used. This small refactor adds an 'Error **err

Re: [PATCH v3 10/15] docs/interop/firmware.json: Add igvm to FirmwareDevice

2024-06-27 Thread Stefano Garzarella
On Fri, Jun 21, 2024 at 03:29:13PM GMT, Roy Hopkins wrote: Create an enum entry within FirmwareDevice for 'igvm' to describe that an IGVM file can be used to map firmware into memory as an alternative to pre-existing firmware devices. Signed-off-by: Roy Hopkins --- docs/interop/firmware.json |

[PATCH] virtio: remove virtio_tswap16s() call in vring_packed_event_read()

2024-07-01 Thread Stefano Garzarella
mu-sta...@nongnu.org Reported-by: Xoykie Link: https://lore.kernel.org/qemu-devel/cafu8rb_pjr77zmlsm0unf9xpnxfr_--tjr49f_ex32zbc5o...@mail.gmail.com Signed-off-by: Stefano Garzarella --- hw/virtio/virtio.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virti

Re: [Bug Report] Possible Missing Endianness Conversion

2024-07-01 Thread Stefano Garzarella
On Fri, Jun 28, 2024 at 03:53:09PM GMT, Peter Maydell wrote: On Tue, 25 Jun 2024 at 08:18, Stefano Garzarella wrote: On Mon, Jun 24, 2024 at 04:19:52PM GMT, Peter Maydell wrote: >On Mon, 24 Jun 2024 at 16:11, Stefano Garzarella wrote: >> >> CCing Jason. >> >> On M

[PATCH] MAINTAINERS: add Stefano Garzarella as vhost/vhost-user reviewer

2024-07-04 Thread Stefano Garzarella
I have recently been working on supporting vhost-user on any POSIX, so I want to help maintain it. Cc: Michael S. Tsirkin Signed-off-by: Stefano Garzarella --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 6725913c8b..47493f19d9 100644 --- a

Re: [PATCH] docs: fix vhost-user protocol doc

2024-08-05 Thread Stefano Garzarella
On Sun, Aug 04, 2024 at 01:04:20PM GMT, luzhixing12345 wrote: add a ref link to Memory region description add extra type(64 bits) to Log description structure fields fix ’s to 's --- docs/interop/vhost-user.rst | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) Plea

Re: [PATCH] vhost-user: rewrite vu_dispatch with if-else

2024-08-05 Thread Stefano Garzarella
On Sun, Aug 04, 2024 at 10:23:53PM GMT, luzhixing12345 wrote: rewrite with if-else instead of goto Why? IMHO was better before this patch with a single error path. and I have a question, in two incorrent cases - need reply but no reply_requested - no need reply but has reply_requested sho

[PATCH] block/blkio: use FUA flag on write zeroes only if supported

2024-08-08 Thread Stefano Garzarella
blkio: add libblkio block driver") Cc: qemu-sta...@nongnu.org Buglink: https://issues.redhat.com/browse/RHEL-32878 Signed-off-by: Stefano Garzarella --- meson.build | 2 ++ block/blkio.c | 6 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build i

[PATCH v6 01/12] libvhost-user: set msg.msg_control to NULL when it is empty

2024-05-28 Thread Stefano Garzarella
: Stefan Hajnoczi Signed-off-by: Stefano Garzarella --- subprojects/libvhost-user/libvhost-user.c | 1 + 1 file changed, 1 insertion(+) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvhost-user/libvhost-user.c index a879149fef..22bea0c775 100644 --- a/subprojects/libvhost

[PATCH v6 05/12] contrib/vhost-user-blk: fix bind() using the right size of the address

2024-05-28 Thread Stefano Garzarella
(struct sockaddr_un). So let's follow the last advice and simplify the code as well. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Acked-by: Stefan Hajnoczi Reviewed-by: David Hildenbrand Signed-off-by: Stefano Garzarella --- contrib/vhost-user-blk/vhost-user-blk.

[PATCH v6 00/12] vhost-user: support any POSIX system (tested on macOS, FreeBSD, OpenBSD)

2024-05-28 Thread Stefano Garzarella
ev socket,id=char0,path=/tmp/vhost.socket Branch pushed (and CI started) at https://gitlab.com/sgarzarella/qemu/-/tree/macos-vhost-user?ref_type=heads Thanks, Stefano Stefano Garzarella (12): libvhost-user: set msg.msg_control to NULL when it is empty libvhost-user: fail vu_message_write() if send

[PATCH v6 07/12] vhost-user: enable frontends on any POSIX system

2024-05-28 Thread Stefano Garzarella
: Philippe Mathieu-Daudé Acked-by: Stefan Hajnoczi Reviewed-by: David Hildenbrand Signed-off-by: Stefano Garzarella --- meson.build| 1 - hw/net/vhost_net.c | 5 + hw/block/Kconfig | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.b

[PATCH v6 04/12] vhost-user-server: do not set memory fd non-blocking

2024-05-28 Thread Stefano Garzarella
noczi Reviewed-by: David Hildenbrand Signed-off-by: Stefano Garzarella --- v3: - avoiding setting fd non-blocking for messages where we have memory fd (Eric) --- util/vhost-user-server.c | 12 1 file changed, 12 insertions(+) diff --git a/util/vhost-user-server.c b/util/vhos

[PATCH v6 06/12] contrib/vhost-user-*: use QEMU bswap helper functions

2024-05-28 Thread Stefano Garzarella
ff-by: Stefano Garzarella --- contrib/vhost-user-blk/vhost-user-blk.c | 9 + contrib/vhost-user-input/main.c | 16 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/contrib/vhost-user-blk/vhost-user-blk.c b/contrib/vhost-user-blk/vhost-user-blk.c

[PATCH v6 02/12] libvhost-user: fail vu_message_write() if sendmsg() is failing

2024-05-28 Thread Stefano Garzarella
: Stefano Garzarella --- subprojects/libvhost-user/libvhost-user.c | 5 + 1 file changed, 5 insertions(+) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvhost-user/libvhost-user.c index 22bea0c775..a11afd1960 100644 --- a/subprojects/libvhost-user/libvhost-user.c

[PATCH v6 08/12] libvhost-user: enable it on any POSIX system

2024-05-28 Thread Stefano Garzarella
defines from include/qemu/memfd.h to make the code works on FreeBSD where MFD_ALLOW_SEALING is defined - define MAP_NORESERVE if it's not defined (e.g. on FreeBSD) Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Acked-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarell

[PATCH v6 03/12] libvhost-user: mask F_INFLIGHT_SHMFD if memfd is not supported

2024-05-28 Thread Stefano Garzarella
end is not able to properly handle these messages. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Acked-by: Stefan Hajnoczi Reviewed-by: David Hildenbrand Signed-off-by: Stefano Garzarella --- subprojects/libvhost-user/libvhost-user.c | 11 +++ 1 file changed, 11

[PATCH v6 09/12] contrib/vhost-user-blk: enable it on any POSIX system

2024-05-28 Thread Stefano Garzarella
pe Mathieu-Daudé Signed-off-by: Stefano Garzarella --- v6: - reverted v5 changes since we can't move O_DSYNC and O_DIRECT in osdep [Daniel, failing tests on Windows] v5: - O_DSYNC and O_DIRECT definition are now in osdep [Phil] - commit updated since we moved out all code changes v4: - moved

[PATCH v6 10/12] hostmem: add a new memory backend based on POSIX shm_open()

2024-05-28 Thread Stefano Garzarella
anonymous memory such as memfd. Acked-by: David Hildenbrand Acked-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella --- v5 - fixed documentation in qapi/qom.json and qemu-options.hx [Markus] v4 - fail if we find "share=off" in shm_backend_memory_alloc() [David] v3 - enriched commit m

[PATCH v6 12/12] tests/qtest/vhost-user-test: add a test case for memory-backend-shm

2024-05-28 Thread Stefano Garzarella
`memory-backend-shm` can be used with vhost-user devices, so let's add a new test case for it. Acked-by: Thomas Huth Acked-by: Stefan Hajnoczi Reviewed-by: David Hildenbrand Signed-off-by: Stefano Garzarella --- tests/qtest/vhost-user-test.c | 23 +++ 1 file change

[PATCH v6 11/12] tests/qtest/vhost-user-blk-test: use memory-backend-shm

2024-05-28 Thread Stefano Garzarella
memfd). Acked-by: Thomas Huth Acked-by: Stefan Hajnoczi Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: David Hildenbrand Signed-off-by: Stefano Garzarella --- v6 - removed `share=on` since it's the default [David] --- tests/qtest/vhost-user-blk-test.c | 2

Re: [PATCH 1/1] vhost-vsock: add VIRTIO_F_RING_PACKED to feaure_bits

2024-05-28 Thread Stefano Garzarella
On Mon, May 27, 2024 at 01:27:10PM GMT, Halil Pasic wrote: On Thu, 16 May 2024 10:39:42 +0200 Stefano Garzarella wrote: [..] >--- > >This is a minimal fix, that follows the current patterns in the >codebase, and not necessarily the best one. Yeah, I did something similar

Re: [PATCH v6 10/12] hostmem: add a new memory backend based on POSIX shm_open()

2024-05-29 Thread Stefano Garzarella
On Wed, May 29, 2024 at 04:50:20PM GMT, Markus Armbruster wrote: Stefano Garzarella writes: shm_open() creates and opens a new POSIX shared memory object. A POSIX shared memory object allows creating memory backend with an associated file descriptor that can be shared with external processes

Re: [PATCH 1/1] vhost-vsock: add VIRTIO_F_RING_PACKED to feaure_bits

2024-05-30 Thread Stefano Garzarella
On Wed, May 29, 2024 at 02:49:28PM GMT, Halil Pasic wrote: On Tue, 28 May 2024 17:32:26 +0200 Stefano Garzarella wrote: >1) The uses is explicitly asking for a vhost device and giving the user >a non vhost device is not an option. I didn't get this point :-( can you elabora

Re: [PATCH] qapi: clarify that the default is backend dependent

2024-06-04 Thread Stefano Garzarella
On Mon, Jun 03, 2024 at 11:34:10AM GMT, Markus Armbruster wrote: Stefano Garzarella writes: The default value of the @share option of the @MemoryBackendProperties eally depends on the backend type, so let's document it explicitly and add the default value where it was missing. Cc:

Re: [PATCH v6 10/12] hostmem: add a new memory backend based on POSIX shm_open()

2024-06-04 Thread Stefano Garzarella
On Mon, Jun 03, 2024 at 11:42:35AM GMT, Markus Armbruster wrote: Stefano Garzarella writes: On Wed, May 29, 2024 at 04:50:20PM GMT, Markus Armbruster wrote: Stefano Garzarella writes: shm_open() creates and opens a new POSIX shared memory object. A POSIX shared memory object allows

[PATCH] qapi/qom: make some QOM properties depend on the build settings

2024-06-04 Thread Stefano Garzarella
Some QOM properties are associated with ObjectTypes that already depend on CONFIG_* switches. So to avoid generating dead code, let's also make the definition of those properties dependent on the corresponding CONFIG_*. Suggested-by: Markus Armbruster Signed-off-by: Stefano Garzarella ---

Re: [PATCH 1/1] vhost-vsock: add VIRTIO_F_RING_PACKED to feaure_bits

2024-05-16 Thread Stefano Garzarella
ee that we should fix it in someway. Thank you for raising this discussion! Regards, Halil --- hw/virtio/vhost-vsock-common.c | 1 + 1 file changed, 1 insertion(+) This patch LGTM, but as I mention we should fix other devices as well, but maybe we can do with the common macro you suggested in

[PATCH] qapi: clarify that the default is backend dependent

2024-05-23 Thread Stefano Garzarella
The default value of the @share option of the @MemoryBackendProperties eally depends on the backend type, so let's document it explicitly and add the default value where it was missing. Cc: David Hildenbrand Suggested-by: Markus Armbruster Signed-off-by: Stefano Garzarella --- I followe

[PATCH v5 01/13] libvhost-user: set msg.msg_control to NULL when it is empty

2024-05-23 Thread Stefano Garzarella
: Stefan Hajnoczi Signed-off-by: Stefano Garzarella --- subprojects/libvhost-user/libvhost-user.c | 1 + 1 file changed, 1 insertion(+) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvhost-user/libvhost-user.c index a879149fef..22bea0c775 100644 --- a/subprojects/libvhost

[PATCH v5 02/13] libvhost-user: fail vu_message_write() if sendmsg() is failing

2024-05-23 Thread Stefano Garzarella
to wrong parameters, but the frontend still sent the payload which the backend incorrectly interpreted as a wrong header. Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Acked-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella

[PATCH v5 03/13] libvhost-user: mask F_INFLIGHT_SHMFD if memfd is not supported

2024-05-23 Thread Stefano Garzarella
end is not able to properly handle these messages. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Acked-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella --- subprojects/libvhost-user/libvhost-user.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/s

[PATCH v5 08/13] libvhost-user: enable it on any POSIX system

2024-05-23 Thread Stefano Garzarella
defines from include/qemu/memfd.h to make the code works on FreeBSD where MFD_ALLOW_SEALING is defined - define MAP_NORESERVE if it's not defined (e.g. on FreeBSD) Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Acked-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarell

[PATCH v5 00/13] vhost-user: support any POSIX system (tested on macOS, FreeBSD, OpenBSD)

2024-05-23 Thread Stefano Garzarella
itlab.com/sgarzarella/qemu/-/tree/macos-vhost-user?ref_type=heads Thanks, Stefano Stefano Garzarella (13): libvhost-user: set msg.msg_control to NULL when it is empty libvhost-user: fail vu_message_write() if sendmsg() is failing libvhost-user: mask F_INFLIGHT_SHMFD if memfd is not suppo

[PATCH v5 04/13] vhost-user-server: do not set memory fd non-blocking

2024-05-23 Thread Stefano Garzarella
ajnoczi Signed-off-by: Stefano Garzarella --- v3: - avoiding setting fd non-blocking for messages where we have memory fd (Eric) --- util/vhost-user-server.c | 12 1 file changed, 12 insertions(+) diff --git a/util/vhost-user-server.c b/util/vhost-user-server.c index 3bfb1ad3ec..b1

[PATCH v5 10/13] contrib/vhost-user-blk: enable it on any POSIX system

2024-05-23 Thread Stefano Garzarella
Previous patches made the vhost-user-blk application and the vhost-user-server.c dependency buildable for any POSIX system. Acked-by: Stefan Hajnoczi Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Stefano Garzarella --- v5: - O_DSYNC and O_DIRECT

[PATCH v5 12/13] tests/qtest/vhost-user-blk-test: use memory-backend-shm

2024-05-23 Thread Stefano Garzarella
ed-by: Philippe Mathieu-Daudé Signed-off-by: Stefano Garzarella --- tests/qtest/vhost-user-blk-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/vhost-user-blk-test.c b/tests/qtest/vhost-user-blk-test.c index 117b9acd10..e945f6abf2 100644 --- a/tests/qtest/

[PATCH v5 11/13] hostmem: add a new memory backend based on POSIX shm_open()

2024-05-23 Thread Stefano Garzarella
anonymous memory such as memfd. Acked-by: David Hildenbrand Acked-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella --- v5 - fixed documentation in qapi/qom.json and qemu-options.hx [Markus] v4 - fail if we find "share=off" in shm_backend_memory_alloc() [David] v3 - enriched commit m

[PATCH v5 07/13] vhost-user: enable frontends on any POSIX system

2024-05-23 Thread Stefano Garzarella
: Philippe Mathieu-Daudé Acked-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella --- meson.build| 1 - hw/net/vhost_net.c | 5 + hw/block/Kconfig | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index a9de71d450..5a6f7a36eb 10

[PATCH v5 09/13] osdep: move O_DSYNC and O_DIRECT defines from file-posix

2024-05-23 Thread Stefano Garzarella
These defines are also useful for vhost-user-blk when it is compiled in some POSIX systems that do not define them, so let's move them to “qemu/osdep.h”. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Stefano Garzarella --- include/qemu/osdep.h | 14 ++ block/file-po

[PATCH v5 13/13] tests/qtest/vhost-user-test: add a test case for memory-backend-shm

2024-05-23 Thread Stefano Garzarella
`memory-backend-shm` can be used with vhost-user devices, so let's add a new test case for it. Acked-by: Thomas Huth Acked-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella --- tests/qtest/vhost-user-test.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/

[PATCH v5 05/13] contrib/vhost-user-blk: fix bind() using the right size of the address

2024-05-23 Thread Stefano Garzarella
(struct sockaddr_un). So let's follow the last advice and simplify the code as well. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Acked-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella --- contrib/vhost-user-blk/vhost-user-blk.c | 4 +--- 1 file changed, 1 inse

[PATCH v5 06/13] contrib/vhost-user-*: use QEMU bswap helper functions

2024-05-23 Thread Stefano Garzarella
Let's replace the calls to le*toh() and htole*() with qemu/bswap.h helpers to make the code more portable. Suggested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Acked-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella --- contrib/

Re: [PATCH v5 09/13] osdep: move O_DSYNC and O_DIRECT defines from file-posix

2024-05-23 Thread Stefano Garzarella
On Thu, May 23, 2024 at 04:14:48PM GMT, Daniel P. Berrangé wrote: On Thu, May 23, 2024 at 04:55:18PM +0200, Stefano Garzarella wrote: These defines are also useful for vhost-user-blk when it is compiled in some POSIX systems that do not define them, so let's move them to “qemu/os

Re: [PATCH v5 12/13] tests/qtest/vhost-user-blk-test: use memory-backend-shm

2024-05-23 Thread Stefano Garzarella
On Thu, May 23, 2024 at 05:06:00PM GMT, David Hildenbrand wrote: On 23.05.24 16:55, Stefano Garzarella wrote: `memory-backend-memfd` is available only on Linux while the new `memory-backend-shm` can be used on any POSIX-compliant operating system. Let's use it so we can run the test in mul

Re: [PATCH v5 09/13] osdep: move O_DSYNC and O_DIRECT defines from file-posix

2024-05-23 Thread Stefano Garzarella
On Thu, May 23, 2024 at 04:55:18PM GMT, Stefano Garzarella wrote: These defines are also useful for vhost-user-blk when it is compiled in some POSIX systems that do not define them, so let's move them to “qemu/osdep.h”. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Stefano Garza

Re: [PATCH] qapi: clarify that the default is backend dependent

2024-06-06 Thread Stefano Garzarella
On Tue, Jun 04, 2024 at 04:58:49PM GMT, Markus Armbruster wrote: Stefano Garzarella writes: On Mon, Jun 03, 2024 at 11:34:10AM GMT, Markus Armbruster wrote: Stefano Garzarella writes: The default value of the @share option of the @MemoryBackendProperties eally depends on the backend type

[PATCH v2] qapi: clarify that the default is backend dependent

2024-06-11 Thread Stefano Garzarella
ff-by: Stefano Garzarella --- v2: - documented @share's default right where it's defined [Markus] v1: https://patchew.org/QEMU/20240523133302.103858-1-sgarz...@redhat.com/ --- qapi/qom.json | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/qapi/qom.json b/qapi

[PATCH v7 00/13] vhost-user: support any POSIX system (tested on macOS, FreeBSD, OpenBSD)

2024-06-12 Thread Stefano Garzarella
ket Branch pushed (and CI started) at https://gitlab.com/sgarzarella/qemu/-/tree/macos-vhost-user?ref_type=heads Based-on: 20240611130231.83152-1-sgarz...@redhat.com Stefano Garzarella (13): qapi: clarify that the default is backend dependent libvhost-user: set msg.msg_control to NULL whe

[PATCH RESEND v7 04/12] vhost-user-server: do not set memory fd non-blocking

2024-06-12 Thread Stefano Garzarella
noczi Reviewed-by: David Hildenbrand Signed-off-by: Stefano Garzarella --- v3: - avoiding setting fd non-blocking for messages where we have memory fd (Eric) --- util/vhost-user-server.c | 12 1 file changed, 12 insertions(+) diff --git a/util/vhost-user-server.c b/util/vhos

[PATCH RESEND v7 06/12] contrib/vhost-user-*: use QEMU bswap helper functions

2024-06-12 Thread Stefano Garzarella
ff-by: Stefano Garzarella --- contrib/vhost-user-blk/vhost-user-blk.c | 9 + contrib/vhost-user-input/main.c | 16 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/contrib/vhost-user-blk/vhost-user-blk.c b/contrib/vhost-user-blk/vhost-user-blk.c

[PATCH RESEND v7 08/12] libvhost-user: enable it on any POSIX system

2024-06-12 Thread Stefano Garzarella
defines from include/qemu/memfd.h to make the code works on FreeBSD where MFD_ALLOW_SEALING is defined - define MAP_NORESERVE if it's not defined (e.g. on FreeBSD) Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Acked-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarell

Re: [PATCH v7 00/13] vhost-user: support any POSIX system (tested on macOS, FreeBSD, OpenBSD)

2024-06-12 Thread Stefano Garzarella
Ooops, wrong cover letter. I just resent the whole series. Sorry for the confusion. Stefano On Wed, Jun 12, 2024 at 2:59 PM Stefano Garzarella wrote: > > This series should be in a good shape, in which tree should we queue it? > @Micheal would your tree be okay? > > Th

[PATCH RESEND v7 11/12] tests/qtest/vhost-user-blk-test: use memory-backend-shm

2024-06-12 Thread Stefano Garzarella
memfd). Acked-by: Thomas Huth Acked-by: Stefan Hajnoczi Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: David Hildenbrand Signed-off-by: Stefano Garzarella --- v6 - removed `share=on` since it's the default [David] --- tests/qtest/vhost-user-blk-test.c | 2

[PATCH RESEND v7 03/12] libvhost-user: mask F_INFLIGHT_SHMFD if memfd is not supported

2024-06-12 Thread Stefano Garzarella
end is not able to properly handle these messages. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Acked-by: Stefan Hajnoczi Reviewed-by: David Hildenbrand Signed-off-by: Stefano Garzarella --- subprojects/libvhost-user/libvhost-user.c | 11 +++ 1 file changed, 11

[PATCH RESEND v7 05/12] contrib/vhost-user-blk: fix bind() using the right size of the address

2024-06-12 Thread Stefano Garzarella
(struct sockaddr_un). So let's follow the last advice and simplify the code as well. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Acked-by: Stefan Hajnoczi Reviewed-by: David Hildenbrand Signed-off-by: Stefano Garzarella --- contrib/vhost-user-blk/vhost-user-blk.

[PATCH RESEND v7 09/12] contrib/vhost-user-blk: enable it on any POSIX system

2024-06-12 Thread Stefano Garzarella
pe Mathieu-Daudé Signed-off-by: Stefano Garzarella --- v6: - reverted v5 changes since we can't move O_DSYNC and O_DIRECT in osdep [Daniel, failing tests on Windows] v5: - O_DSYNC and O_DIRECT definition are now in osdep [Phil] - commit updated since we moved out all code changes v4: - moved

[PATCH RESEND v7 07/12] vhost-user: enable frontends on any POSIX system

2024-06-12 Thread Stefano Garzarella
: Philippe Mathieu-Daudé Acked-by: Stefan Hajnoczi Reviewed-by: David Hildenbrand Signed-off-by: Stefano Garzarella --- meson.build| 1 - hw/net/vhost_net.c | 5 + hw/block/Kconfig | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.b

[PATCH RESEND v7 10/12] hostmem: add a new memory backend based on POSIX shm_open()

2024-06-12 Thread Stefano Garzarella
anonymous memory such as memfd. Acked-by: David Hildenbrand Acked-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella --- v7 - changed default value documentation for @share rebasing on 20240611130231.83152-1-sgarz...@redhat.com [Markus] - used `memory-backend-shm` instead of `shm` and wrapped to

[PATCH RESEND v7 02/12] libvhost-user: fail vu_message_write() if sendmsg() is failing

2024-06-12 Thread Stefano Garzarella
: Stefano Garzarella --- subprojects/libvhost-user/libvhost-user.c | 5 + 1 file changed, 5 insertions(+) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvhost-user/libvhost-user.c index 22bea0c775..a11afd1960 100644 --- a/subprojects/libvhost-user/libvhost-user.c

[PATCH RESEND v7 12/12] tests/qtest/vhost-user-test: add a test case for memory-backend-shm

2024-06-12 Thread Stefano Garzarella
`memory-backend-shm` can be used with vhost-user devices, so let's add a new test case for it. Acked-by: Thomas Huth Acked-by: Stefan Hajnoczi Reviewed-by: David Hildenbrand Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Stefano Garzarella --- tests/qtest/vhost-user-test.c

[PATCH RESEND v7 01/12] libvhost-user: set msg.msg_control to NULL when it is empty

2024-06-12 Thread Stefano Garzarella
: Stefan Hajnoczi Signed-off-by: Stefano Garzarella --- subprojects/libvhost-user/libvhost-user.c | 1 + 1 file changed, 1 insertion(+) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvhost-user/libvhost-user.c index a879149fef..22bea0c775 100644 --- a/subprojects/libvhost

[PATCH RESEND v7 00/12] vhost-user: support any POSIX system (tested on macOS, FreeBSD, OpenBSD)

2024-06-12 Thread Stefano Garzarella
ket Branch pushed (and CI started) at https://gitlab.com/sgarzarella/qemu/-/tree/macos-vhost-user?ref_type=heads Based-on: 20240611130231.83152-1-sgarz...@redhat.com Stefano Garzarella (12): libvhost-user: set msg.msg_control to NULL when it is empty libvhost-user: fail vu_message_write() if s

Re: [PATCH RESEND v7 10/12] hostmem: add a new memory backend based on POSIX shm_open()

2024-06-13 Thread Stefano Garzarella
On Wed, Jun 12, 2024 at 03:20:48PM GMT, Markus Armbruster wrote: Stefano Garzarella writes: shm_open() creates and opens a new POSIX shared memory object. A POSIX shared memory object allows creating memory backend with an associated file descriptor that can be shared with external processes

Re: [PATCH RESEND v7 00/12] vhost-user: support any POSIX system (tested on macOS, FreeBSD, OpenBSD)

2024-06-17 Thread Stefano Garzarella
Hi Michael, On Wed, Jun 12, 2024 at 03:01:28PM GMT, Stefano Garzarella wrote: This series should be in a good shape, in which tree should we queue it? @Micheal would your tree be okay? Markus suggested a small change to patch 10, so do you want me to resend the whole series, or is it okay to

Re: [PATCH RESEND v7 00/12] vhost-user: support any POSIX system (tested on macOS, FreeBSD, OpenBSD)

2024-06-17 Thread Stefano Garzarella
On Mon, Jun 17, 2024 at 02:02:30PM GMT, Markus Armbruster wrote: Stefano Garzarella writes: Hi Michael, On Wed, Jun 12, 2024 at 03:01:28PM GMT, Stefano Garzarella wrote: This series should be in a good shape, in which tree should we queue it? @Micheal would your tree be okay? Markus

Re: [PATCH RESEND v7 00/12] vhost-user: support any POSIX system (tested on macOS, FreeBSD, OpenBSD)

2024-06-17 Thread Stefano Garzarella
On Mon, Jun 17, 2024 at 09:42:21AM GMT, Michael S. Tsirkin wrote: On Mon, Jun 17, 2024 at 02:59:14PM +0200, Stefano Garzarella wrote: On Mon, Jun 17, 2024 at 02:02:30PM GMT, Markus Armbruster wrote: > Stefano Garzarella writes: > > > Hi Michael, > > > > On Wed, Jun 12

[PATCH v8 02/13] libvhost-user: set msg.msg_control to NULL when it is empty

2024-06-18 Thread Stefano Garzarella
: Stefan Hajnoczi Signed-off-by: Stefano Garzarella --- subprojects/libvhost-user/libvhost-user.c | 1 + 1 file changed, 1 insertion(+) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvhost-user/libvhost-user.c index a879149fef..22bea0c775 100644 --- a/subprojects/libvhost

[PATCH v8 01/13] qapi: clarify that the default is backend dependent

2024-06-18 Thread Stefano Garzarella
ed-by: Markus Armbruster Signed-off-by: Stefano Garzarella --- v2: https://patchew.org/QEMU/20240611130231.83152-1-sgarz...@redhat.com/ v1: https://patchew.org/QEMU/20240523133302.103858-1-sgarz...@redhat.com/ --- qapi/qom.json | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --

[PATCH v8 00/13] vhost-user: support any POSIX system (tested on macOS, FreeBSD, OpenBSD)

2024-06-18 Thread Stefano Garzarella
;512M" \ -device vhost-user-blk-pci,num-queues=1,chardev=char0 \ -chardev socket,id=char0,path=/tmp/vhost.socket Branch pushed (and CI started) at https://gitlab.com/sgarzarella/qemu/-/tree/macos-vhost-user?ref_type=heads Stefano Garzarella (13): qapi: clarify that the default is

[PATCH v8 04/13] libvhost-user: mask F_INFLIGHT_SHMFD if memfd is not supported

2024-06-18 Thread Stefano Garzarella
end is not able to properly handle these messages. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Acked-by: Stefan Hajnoczi Reviewed-by: David Hildenbrand Signed-off-by: Stefano Garzarella --- subprojects/libvhost-user/libvhost-user.c | 11 +++ 1 file changed, 11

[PATCH v8 03/13] libvhost-user: fail vu_message_write() if sendmsg() is failing

2024-06-18 Thread Stefano Garzarella
: Stefano Garzarella --- subprojects/libvhost-user/libvhost-user.c | 5 + 1 file changed, 5 insertions(+) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvhost-user/libvhost-user.c index 22bea0c775..a11afd1960 100644 --- a/subprojects/libvhost-user/libvhost-user.c

[PATCH v8 05/13] vhost-user-server: do not set memory fd non-blocking

2024-06-18 Thread Stefano Garzarella
noczi Reviewed-by: David Hildenbrand Signed-off-by: Stefano Garzarella --- v3: - avoiding setting fd non-blocking for messages where we have memory fd (Eric) --- util/vhost-user-server.c | 12 1 file changed, 12 insertions(+) diff --git a/util/vhost-user-server.c b/util/vhos

[PATCH v8 08/13] vhost-user: enable frontends on any POSIX system

2024-06-18 Thread Stefano Garzarella
: Philippe Mathieu-Daudé Acked-by: Stefan Hajnoczi Reviewed-by: David Hildenbrand Signed-off-by: Stefano Garzarella --- meson.build| 1 - hw/net/vhost_net.c | 5 + hw/block/Kconfig | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.b

[PATCH v8 06/13] contrib/vhost-user-blk: fix bind() using the right size of the address

2024-06-18 Thread Stefano Garzarella
(struct sockaddr_un). So let's follow the last advice and simplify the code as well. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Acked-by: Stefan Hajnoczi Reviewed-by: David Hildenbrand Signed-off-by: Stefano Garzarella --- contrib/vhost-user-blk/vhost-user-blk.

<    1   2   3   4   5   6   7   8   9   10   >