Re: [PATCH v6 2/3] vhost-user-blk: split vhost_user_blk_sync_config()

2024-10-01 Thread Stefano Garzarella
llback. LGTM! Reviewed-by: Stefano Garzarella +{ +int ret; +VirtIODevice *vdev = VIRTIO_DEVICE(dev); +VHostUserBlk *s = VHOST_USER_BLK(vdev); + +ret = vhost_dev_get_config(&s->dev, (uint8_t *)&s->blkcfg, + vdev->config_len, errp); +

Re: [PATCH V2] virtio/vhost-user: fix qemu abort when hotunplug vhost-user-net device

2024-10-01 Thread Stefano Garzarella
On Thu, Sep 19, 2024 at 03:29:44PM GMT, yaozhenguo wrote: During the process of hot-unplug in vhost-user-net NIC, vhost_user_cleanup may add same rcu node to rcu list. Function calls are as follows: vhost_user_cleanup ->vhost_user_host_notifier_remove ->call_rcu(n, vhost_user_host_noti

Re: [PATCH] vhost: Remove unused vhost_dev_{load|save}_inflight

2024-10-01 Thread Stefano Garzarella
mu and backend") Remove them, and their helper vhost_dev_resize_inflight. Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/vhost.c | 56 --- include/hw/virtio/vhost.h | 2 -- 2 files changed, 58 deletions(-) Reviewed-by: Stefano Garzarella di

Re: [PATCH v6 04/16] hw/i386: Add igvm-cfg object and processing for IGVM files

2024-10-01 Thread Stefano Garzarella
: Michael S. Tsirkin --- hw/i386/pc.c | 12 hw/i386/pc_piix.c | 10 ++ hw/i386/pc_q35.c | 10 ++ include/hw/i386/x86.h | 3 +++ qemu-options.hx | 28 5 files changed, 63 insertions(+) Reviewed-by: Stefano Garzarella diff

Re: [PATCH v3 18/22] hw/virtio: fix -Werror=maybe-uninitialized

2024-09-30 Thread Stefano Garzarella
eturn value. Signed-off-by: Marc-André Lureau --- hw/virtio/vhost-shadow-virtqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefano Garzarella diff --git a/hw/virtio/vhost-shadow-virtqueue.c b/hw/virtio/vhost-shadow-virtqueue.c index fc5f408f77..3b2beaea24 100644 ---

Re: [PATCH v2 18/22] hw/virtio: fix -Werror=maybe-uninitialized false-positive

2024-09-30 Thread Stefano Garzarella
On Fri, Sep 27, 2024 at 3:08 PM Eugenio Perez Martin wrote: > > On Wed, Sep 25, 2024 at 10:08 AM Stefano Garzarella > wrote: > > > > On Tue, Sep 24, 2024 at 05:05:49PM GMT, marcandre.lur...@redhat.com wrote: > > >From: Marc-André Lureau > > > >

Re: [PATCH v2 18/22] hw/virtio: fix -Werror=maybe-uninitialized false-positive

2024-09-30 Thread Stefano Garzarella
On Fri, Sep 27, 2024 at 3:05 PM Eugenio Perez Martin wrote: > > On Tue, Sep 24, 2024 at 3:07 PM wrote: > > > > From: Marc-André Lureau > > > > ../hw/virtio/vhost-shadow-virtqueue.c:545:13: error: ‘r’ may be used > > uninitialized [-Werror=maybe-uninitialized] > > > > Signed-off-by: Marc-André L

Re: [PATCH v2 22/22] RFC: hw/virtio: a potential leak fix

2024-09-25 Thread Stefano Garzarella
On Tue, Sep 24, 2024 at 05:05:53PM GMT, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau vhost_svq_get_buf() may return a VirtQueueElement that should be freed. It's unclear to me if the vhost_svq_get_buf() call should always return NULL. Signed-off-by: Marc-André Lureau --- hw/vir

Re: [PATCH v2 18/22] hw/virtio: fix -Werror=maybe-uninitialized false-positive

2024-09-25 Thread Stefano Garzarella
On Tue, Sep 24, 2024 at 05:05:49PM GMT, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau For the title: I don't think it is a false positive, but a real fix, indeed maybe not a complete one. ../hw/virtio/vhost-shadow-virtqueue.c:545:13: error: ‘r’ may be used uninitialized [-Werr

Re: [PATCH v2 13/22] hw/virtio-blk: fix -Werror=maybe-uninitialized false-positive

2024-09-25 Thread Stefano Garzarella
| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefano Garzarella diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 115795392c..9166d7974d 100644 --- a/hw/block/virtio-blk.c +++ b/hw/block/virtio-blk.c @@ -1060,7 +1060,7 @@ static void virtio_blk_dma_restart_cb

Re: [PATCH v2 09/22] hw/vhost-scsi: fix -Werror=maybe-uninitialized

2024-09-25 Thread Stefano Garzarella
/* Use default worker */ if (!per_virtqueue || dev->nvqs == VHOST_SCSI_VQ_NUM_FIXED + 1) { Another option could have been to edit this check: if (!per_virtqueue || dev->nvqs <= VHOST_SCSI_VQ_NUM_FIXED + 1) { return 0; } But I'm fine with your change: Reviewed-by: Stefano Garzarella

Re: [PATCH V2 1/1] virtio-pci: Add lookup subregion of VirtIOPCIRegion MR

2024-09-03 Thread Stefano Garzarella
On Thu, Aug 29, 2024 at 01:13:43PM GMT, Gao,Shiyuan wrote: >--- a/hw/virtio/virtio-pci.c >+++ b/hw/virtio/virtio-pci.c >@@ -610,19 +610,29 @@ static MemoryRegion *virtio_address_space_lookup(VirtIOPCIProxy *proxy, > { > int i; > VirtIOPCIRegion *reg; >+    MemoryRegion *mr = NULL; `mr`

Re: [PATCH] virtio/vhost-user: fix qemu crash when hotunplug vhost-user-net device

2024-09-03 Thread Stefano Garzarella
stUserHostNotifier. yeah, thank you for this detailed analysis, now it's clear. My suggestion is to put some of it in the commit description as well, maybe a summary with the main things. Stefano Garzarella 于2024年8月27日周二 16:00写道: On Wed, Aug 07, 2024 at 05:55:08PM GMT, yaozhenguo wrote: >

Re: [PATCH v5 00/16] Introduce support for IGVM files

2024-09-02 Thread Stefano Garzarella
x27;t find anything obviously wrong, so for those feel free to add: Acked-by: Stefano Garzarella Thanks, Stefano Changes in v5: * Fix indentation and apply minimum version check for IGVM library in meson.build * Remove unneeded duplicate macro definitions in confidential-guest-support.h and

Re: [PATCH v5 13/16] backends/igvm: Process initialization sections in IGVM file

2024-09-02 Thread Stefano Garzarella
measurement of a guest. This commit introduces handling of the initialization sections during processing of the IGVM file. Signed-off-by: Roy Hopkins Acked-by: Michael S. Tsirkin --- backends/igvm.c | 21 + 1 file changed, 21 insertions(+) Reviewed-by: Stefano Garzarella diff

Re: [PATCH v5 12/16] backends/confidential-guest-support: Add set_guest_policy() function

2024-09-02 Thread Stefano Garzarella
. Signed-off-by: Roy Hopkins Reviewed-by: Daniel P. Berrangé Acked-by: Michael S. Tsirkin --- backends/confidential-guest-support.c | 12 include/exec/confidential-guest-support.h | 21 + 2 files changed, 33 insertions(+) Reviewed-by: Stefano Garzarella

Re: [PATCH v5 11/16] docs/interop/firmware.json: Add igvm to FirmwareDevice

2024-09-02 Thread Stefano Garzarella
state of the guest. The IGVM file may be shared by multiple +#virtual machine definitions. This corresponds to creating +# an object on the command line with "-object igvm-cfg, +#file=@filename". +# +# Since: 9.1 Ditto With them fixed:

Re: [PATCH v5 07/16] target/i386: Allow setting of R_LDTR and R_TR with cpu_x86_load_seg_cache()

2024-09-02 Thread Stefano Garzarella
ndling for R_LDTR and R_TR in the function. Signed-off-by: Roy Hopkins Reviewed-by: Michael S. Tsirkin --- target/i386/cpu.h | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) Reviewed-by: Stefano Garzarella diff --git a/target/i386/cpu.h b/target/i386/cpu.h index c6cc035df3..

Re: [PATCH v5 06/16] sev: Update launch_update_data functions to use Error handling

2024-09-02 Thread Stefano Garzarella
Reviewed-by: Stefano Garzarella diff --git a/target/i386/sev.c b/target/i386/sev.c index a0d271f898..fab6d1bfb4 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c @@ -121,7 +121,8 @@ struct SevCommonStateClass { Error **errp); int (*la

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

2024-09-02 Thread Stefano Garzarella
--- 1 file changed, 28 insertions(+), 3 deletions(-) Reviewed-by: Stefano Garzarella diff --git a/hw/i386/pc_sysfw.c b/hw/i386/pc_sysfw.c index ef80281d28..f5e40b3ef6 100644 --- a/hw/i386/pc_sysfw.c +++ b/hw/i386/pc_sysfw.c @@ -219,7 +219,13 @@ void pc_system_firmware_init(PCMachineState

Re: [PATCH v5 04/16] hw/i386: Add igvm-cfg object and processing for IGVM files

2024-09-02 Thread Stefano Garzarella
On Tue, Aug 13, 2024 at 04:01:06PM GMT, Roy Hopkins wrote: An IGVM file contains configuration of guest state that should be applied during configuration of the guest, before the guest is started. This patch allows the user to add an igvm-cfg object to an X86 machine configuration that allows an

Re: [PATCH v5 03/16] backends/igvm: Add IGVM loader and configuration

2024-09-02 Thread Stefano Garzarella
On Tue, Aug 13, 2024 at 04:01:05PM 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 v5 02/16] backends/confidential-guest-support: Add functions to support IGVM

2024-09-02 Thread Stefano Garzarella
ith int, but I'd document the return value, since 0 in this case is not supported, right? BTW, code LGTM: Reviewed-by: Stefano Garzarella +int (*check_support)(ConfidentialGuestPlatformType platform, + uint16_t platform_version, uint8_t highest_vtl, +

Re: [PATCH v5 01/16] meson: Add optional dependency on IGVM library

2024-09-02 Thread Stefano Garzarella
ConfidentialGuestSupport object. Signed-off-by: Roy Hopkins Acked-by: Michael S. Tsirkin --- backends/meson.build | 3 +++ meson.build | 8 meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 4 files changed, 16 insertions(+) Reviewed-by: Stefano

Re: [PATCH V2 1/1] virtio-pci: Add lookup subregion of VirtIOPCIRegion MR

2024-08-27 Thread Stefano Garzarella
On Tue, Aug 20, 2024 at 07:56:31PM GMT, Gao Shiyuan wrote: When VHOST_USER_PROTOCOL_F_HOST_NOTIFIER feature negotiated and virtio_queue_set_host_notifier_mr success on system blk device's queue, the VM can't load MBR if the notify region's address above 4GB. Assign the address of notify region i

Re: [PATCH] vhost-user: add NEED_REPLY flag

2024-08-27 Thread Stefano Garzarella
On Mon, Aug 12, 2024 at 12:53:19PM GMT, 陆知行 wrote: Hi, can someone review this patch? I find requests which call vhost_user_get_u64 does not set NEED_REPLY flag Can you provide an example to trigger this issue? Also, with this change all calls to vhost_user_get_u64() will set that flag, is t

Re: [PATCH] virtio/vhost-user: fix qemu crash when hotunplug vhost-user-net device

2024-08-27 Thread Stefano Garzarella
On Wed, Aug 07, 2024 at 05:55:08PM GMT, yaozhenguo wrote: When hotplug and hotunplug vhost-user-net device quickly. I'd replace the . with , qemu will crash. BT is as below: 0 __pthread_kill_implementation () at /usr/lib64/libc.so.6 1 raise () at /usr/lib64/libc.so.6 2 abort () at /usr/li

[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

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

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 v4 11/17] docs/system: Add documentation on support for IGVM

2024-07-29 Thread Stefano Garzarella
/programmer-references/24593.pdf + +[2] ``buildigvm`` - A tool to build example IGVM files containing OVMF firmware + https://github.com/roy-hopkins/buildigvm Should we also put a reference to the tool we have in Coconut SVSM? BTW, this patch LGTM: Reviewed-by: Stefano Garzarella \ No newli

Re: [PATCH v4 03/17] backends/igvm: Add IGVM loader and configuration

2024-07-29 Thread Stefano Garzarella
On Wed, Jul 03, 2024 at 12:05:41PM 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

[PATCH v2] scripts/checkpatch: more checks on files imported from Linux

2024-07-18 Thread Stefano Garzarella
If a file imported from Linux is touched, emit a warning and suggest using scripts/update-linux-headers.sh. Also check that updating imported files from Linux are not mixed with other changes, in which case emit an error. Signed-off-by: Stefano Garzarella --- v2: - added an error when mixing

Re: [PATCH] scripts/checkpatch: emit a warning if an imported file is touched

2024-07-17 Thread Stefano Garzarella
On Wed, Jul 17, 2024 at 11:58:46AM GMT, Cornelia Huck wrote: On Wed, Jul 17 2024, Stefano Garzarella wrote: If a file imported from Linux is touched, emit a warning and suggest using scripts/update-linux-headers.sh Signed-off-by: Stefano Garzarella --- scripts/checkpatch.pl | 14

Re: [PATCH] scripts/checkpatch: emit a warning if an imported file is touched

2024-07-17 Thread Stefano Garzarella
On Wed, Jul 17, 2024 at 10:50:51AM GMT, Daniel P. Berrangé wrote: On Wed, Jul 17, 2024 at 11:37:52AM +0200, Stefano Garzarella wrote: If a file imported from Linux is touched, emit a warning and suggest using scripts/update-linux-headers.sh Signed-off-by: Stefano Garzarella --- scripts

[PATCH] scripts/checkpatch: emit a warning if an imported file is touched

2024-07-17 Thread Stefano Garzarella
If a file imported from Linux is touched, emit a warning and suggest using scripts/update-linux-headers.sh Signed-off-by: Stefano Garzarella --- scripts/checkpatch.pl | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts

[PATCH] contrib/vhost-user-blk: fix overflowing expression

2024-07-12 Thread Stefano Garzarella
9454 Fixes: 5ab04420c3 ("contrib/vhost-user-*: use QEMU bswap helper functions") Fixes: caa1ee4313 ("vhost-user-blk: add discard/write zeroes features support") Cc: changpeng@intel.com Suggested-by: Peter Maydell Signed-off-by: Stefano Garzarella --- contrib/vhost-user-b

Re: [PULL v3 52/85] contrib/vhost-user-*: use QEMU bswap helper functions

2024-07-12 Thread Stefano Garzarella
On Fri, Jul 12, 2024 at 03:24:47PM GMT, Peter Maydell wrote: On Wed, 3 Jul 2024 at 23:48, Michael S. Tsirkin wrote: From: 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-

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

2024-07-05 Thread Stefano Garzarella
On Wed, Jul 03, 2024 at 06:49:30PM GMT, Michael S. Tsirkin wrote: On Tue, Jun 18, 2024 at 12:00:30PM +0200, Stefano Garzarella wrote: As discussed with Michael and Markus [1], this version also includes the patch on which v7 depended to simplify the merge in Michael's tree. The series i

[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: [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] 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: [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 |

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 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 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] 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: [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: [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

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

2024-06-18 Thread Stefano Garzarella
anonymous memory such as memfd. Acked-by: David Hildenbrand Acked-by: Stefan Hajnoczi Acked-by: Markus Armbruster (QAPI schema) Signed-off-by: Stefano Garzarella --- v8 - Fixed QAPI documentation about share option [Markus] v7 - changed default value documentation for @share rebasing on

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

2024-06-18 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 v8 12/13] tests/qtest/vhost-user-blk-test: use memory-backend-shm

2024-06-18 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 v8 09/13] libvhost-user: enable it on any POSIX system

2024-06-18 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 v8 10/13] contrib/vhost-user-blk: enable it on any POSIX system

2024-06-18 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 v8 07/13] contrib/vhost-user-*: use QEMU bswap helper functions

2024-06-18 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 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.

[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 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 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 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 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 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 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

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

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
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 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

[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

[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 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 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 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 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 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 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 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

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 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

[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 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 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 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

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] 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 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

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 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 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-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

[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

[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 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 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 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 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 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 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 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 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

  1   2   3   4   5   6   7   8   9   10   >