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

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

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 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 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 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 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 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 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 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 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 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 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 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 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] 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 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 v2 04/10] vdpa-dev: implement the instance_init/class_init interface

2022-03-07 Thread Stefano Garzarella
Hi Longpeng, On Sat, Mar 05, 2022 at 06:06:42AM +, Longpeng (Mike, Cloud Infrastructure Service Product Dept.) wrote: Hi Stefano, -Original Message- From: Stefano Garzarella [mailto:sgarz...@redhat.com] Sent: Wednesday, January 19, 2022 7:24 PM To: Longpeng (Mike, Cloud

Re: [PATCH v2 05/10] vdpa-dev: implement the realize interface

2022-03-07 Thread Stefano Garzarella
On Sat, Mar 05, 2022 at 07:07:54AM +, Longpeng (Mike, Cloud Infrastructure Service Product Dept.) wrote: -Original Message- From: Stefano Garzarella [mailto:sgarz...@redhat.com] Sent: Wednesday, January 19, 2022 7:31 PM To: Longpeng (Mike, Cloud Infrastructure Service Product

Re: [PATCH v2 04/10] vdpa-dev: implement the instance_init/class_init interface

2022-03-07 Thread Stefano Garzarella
On Mon, Mar 07, 2022 at 08:55:35AM +, Longpeng (Mike, Cloud Infrastructure Service Product Dept.) wrote: -Original Message- From: Stefano Garzarella [mailto:sgarz...@redhat.com] Sent: Monday, March 7, 2022 4:10 PM To: Longpeng (Mike, Cloud Infrastructure Service Product Dept

Re: [PATCH v2 05/10] vdpa-dev: implement the realize interface

2022-03-07 Thread Stefano Garzarella
On Mon, Mar 07, 2022 at 11:13:02AM +, Longpeng (Mike, Cloud Infrastructure Service Product Dept.) wrote: -Original Message- From: Stefano Garzarella [mailto:sgarz...@redhat.com] Sent: Monday, March 7, 2022 4:24 PM To: Longpeng (Mike, Cloud Infrastructure Service Product Dept

Re: [PATCH v2 05/10] vdpa-dev: implement the realize interface

2022-03-08 Thread Stefano Garzarella
On Tue, Mar 08, 2022 at 03:19:55AM +, Longpeng (Mike, Cloud Infrastructure Service Product Dept.) wrote: -Original Message- From: Stefano Garzarella [mailto:sgarz...@redhat.com] Sent: Monday, March 7, 2022 8:14 PM To: Longpeng (Mike, Cloud Infrastructure Service Product Dept

Re: [PATCH v2 05/10] vdpa-dev: implement the realize interface

2022-03-08 Thread Stefano Garzarella
On Tue, Mar 08, 2022 at 09:42:25AM +, Longpeng (Mike, Cloud Infrastructure Service Product Dept.) wrote: -Original Message- From: Stefano Garzarella [mailto:sgarz...@redhat.com] Sent: Tuesday, March 8, 2022 4:41 PM To: Longpeng (Mike, Cloud Infrastructure Service Product Dept

Re: [PATCH] block/io_uring: clarify that short reads can happen

2022-07-06 Thread Stefano Garzarella
aining read request needs to be + * resubmitted. */ static void luring_resubmit_short_read(LuringState *s, LuringAIOCB *luringcb, int nread) -- 2.36.1 Thanks for fixing the comment! Reviewed-by: Stefano Garzarella

Re: [RFC v3 1/8] blkio: add io_uring block driver using libblkio

2022-07-12 Thread Stefano Garzarella
On Fri, Jul 08, 2022 at 05:17:30AM +0100, Stefan Hajnoczi wrote: libblkio (https://gitlab.com/libblkio/libblkio/) is a library for high-performance disk I/O. It currently supports io_uring and virtio-blk-vhost-vdpa with additional drivers under development. One of the reasons for developing libb

Re: [RFC v3 7/8] blkio: implement BDRV_REQ_REGISTERED_BUF optimization

2022-07-12 Thread Stefano Garzarella
On Fri, Jul 08, 2022 at 05:17:36AM +0100, Stefan Hajnoczi wrote: Avoid bounce buffers when QEMUIOVector elements are within previously registered bdrv_register_buf() buffers. The idea is that emulated storage controllers will register guest RAM using bdrv_register_buf() and set the BDRV_REQ_REGI

Re: [PATCH] block/io_uring: add missing include file

2022-07-21 Thread Stefano Garzarella
52e0 100644 --- a/block/io_uring.c +++ b/block/io_uring.c @@ -11,6 +11,7 @@ #include "qemu/osdep.h" #include #include "block/aio.h" +#include "qemu/error-report.h" #include "qemu/queue.h" #include "block/block.h" #include "block/raw-aio.h" -- 2.25.1 Thanks for the fix: Reviewed-by: Stefano Garzarella

Re: [PATCH v3] block/gluster: correctly set max_pdiscard

2022-05-25 Thread Stefano Garzarella
g Signed-off-by: Fabian Ebner --- v2 -> v3: * Keep assertion in qemu_gluster_co_pdiscard() as is. * Improve commit message. v1 -> v2: * Use an expression that works for both 64-bit and 32-bit platforms. block/gluster.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Revi

Re: [PATCH v2] block/rbd: report a better error when namespace does not exist

2022-05-30 Thread Stefano Garzarella
Gentle ping :-) @Kevin, can this patch go with your tree? Ilya already reviewed it. Thanks, Stefano On Tue, May 17, 2022 at 09:10:12AM +0200, Stefano Garzarella wrote: If the namespace does not exist, rbd_create() fails with -ENOENT and QEMU reports a generic "error rbd create: No such

[PATCH] block/rbd: fix write zeroes with growing images

2022-03-17 Thread Stefano Garzarella
blems with qcow2. So let's move the resize into qemu_rbd_start_co() and do it when the command is RBD_AIO_WRITE or RBD_AIO_WRITE_ZEROES. Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2020993 Fixes: c56ac27d2a ("block/rbd: add write zeroes support") Signed-off-by: Stefano Gar

Re: [PATCH] block/rbd: fix write zeroes with growing images

2022-03-18 Thread Stefano Garzarella
On Thu, Mar 17, 2022 at 07:27:05PM +0100, Peter Lieven wrote: Am 17.03.2022 um 17:26 schrieb Stefano Garzarella : Commit d24f80234b ("block/rbd: increase dynamically the image size") added a workaround to support growing images (eg. qcow2), resizing the image before write opera

Re: [PATCH] block/rbd: fix write zeroes with growing images

2022-03-18 Thread Stefano Garzarella
On Fri, Mar 18, 2022 at 04:48:18PM +0100, Peter Lieven wrote: Am 18.03.2022 um 09:25 schrieb Stefano Garzarella : On Thu, Mar 17, 2022 at 07:27:05PM +0100, Peter Lieven wrote: Am 17.03.2022 um 17:26 schrieb Stefano Garzarella : Commit d24f80234b ("block/rbd: increase dynamicall

Re: [PATCH] block/rbd: fix write zeroes with growing images

2022-03-21 Thread Stefano Garzarella
On Sat, Mar 19, 2022 at 02:23:18PM +0100, Ilya Dryomov wrote: On Sat, Mar 19, 2022 at 1:40 PM Ilya Dryomov wrote: On Fri, Mar 18, 2022 at 9:25 AM Stefano Garzarella wrote: > > On Thu, Mar 17, 2022 at 07:27:05PM +0100, Peter Lieven wrote: > > > > > >> Am 17.03.20

Re: [PATCH] block/rbd: fix write zeroes with growing images

2022-03-21 Thread Stefano Garzarella
On Sat, Mar 19, 2022 at 04:15:33PM +0100, Peter Lieven wrote: Am 18.03.2022 um 17:47 schrieb Stefano Garzarella : On Fri, Mar 18, 2022 at 04:48:18PM +0100, Peter Lieven wrote: Am 18.03.2022 um 09:25 schrieb Stefano Garzarella : On Thu, Mar 17, 2022 at 07:27:05PM +0100, Peter Lieven

Re: [PATCH] block/rbd: fix write zeroes with growing images

2022-03-24 Thread Stefano Garzarella
On Thu, Mar 24, 2022 at 10:52:04AM +0100, Peter Lieven wrote: Am 22.03.22 um 10:38 schrieb Hanna Reitz: On 21.03.22 09:31, Stefano Garzarella wrote: On Sat, Mar 19, 2022 at 04:15:33PM +0100, Peter Lieven wrote: Am 18.03.2022 um 17:47 schrieb Stefano Garzarella : On Fri, Mar 18, 2022 at

Re: [PATCH v3 05/10] vdpa-dev: implement the realize interface

2022-03-28 Thread Stefano Garzarella
On Sat, Mar 19, 2022 at 03:20:07PM +0800, Longpeng(Mike) wrote: >From: Longpeng > >Implements the .realize interface. > >Signed-off-by: Longpeng >--- > hw/virtio/vdpa-dev-pci.c | 18 - > hw/virtio/vdpa-dev.c | 132 +++ > include/hw/virtio/vdpa-dev.h

Re: [PATCH v3 00/10] add generic vDPA device support

2022-03-28 Thread Stefano Garzarella
On Sat, Mar 19, 2022 at 03:20:02PM +0800, Longpeng(Mike) wrote: From: Longpeng Hi guys, With the generic vDPA device, QEMU won't need to touch the device types any more, such like vfio. We can use the generic vDPA device as follow: -device vhost-vdpa-device-pci,vdpa-dev=/dev/vhost-vdpa-X I'

[PATCH] vhost-vdpa: fix typo in a comment

2022-03-28 Thread Stefano Garzarella
Replace vpda with vdpa. Signed-off-by: Stefano Garzarella --- hw/virtio/vhost-vdpa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index c5ed7a3779..8adf7c0b92 100644 --- a/hw/virtio/vhost-vdpa.c +++ b/hw/virtio/vhost-vdpa.c

Re: [PATCH v3 05/10] vdpa-dev: implement the realize interface

2022-03-29 Thread Stefano Garzarella
On Tue, Mar 29, 2022 at 7:16 AM Longpeng (Mike, Cloud Infrastructure Service Product Dept.) wrote: > > On Sat, Mar 19, 2022 at 03:20:07PM +0800, Longpeng(Mike) wrote: > > >From: Longpeng > > > > > [snap] > > > > static void vhost_vdpa_device_unrealize(DeviceState *dev) > > >@@ -66,6 +197,7 @@ sta

Re: [RFC 7/8] blkio: implement BDRV_REQ_REGISTERED_BUF optimization

2022-03-29 Thread Stefano Garzarella
On Wed, Mar 23, 2022 at 11:17:26AM +, Stefan Hajnoczi wrote: Avoid bounce buffers when QEMUIOVector elements are within previously registered bdrv_register_buf() buffers. The idea is that emulated storage controllers will register guest RAM using bdrv_register_buf() and set the BDRV_REQ_REGI

Re: [RFC 0/8] blkio: add libblkio BlockDriver

2022-03-29 Thread Stefano Garzarella
On Wed, Mar 23, 2022 at 11:17:19AM +, Stefan Hajnoczi wrote: This patch series adds a QEMU BlockDriver for libblkio (https://gitlab.com/libblkio/libblkio/), a library for high-performance block device I/O. Currently libblkio has basic io_uring support with additional drivers in development.

Re: [PATCH] hw/elf_ops.h: switch to ssize_t for elf loader return type

2021-10-14 Thread Stefano Garzarella
On Wed, Oct 06, 2021 at 09:28:39PM +0200, Luc Michel wrote: Until now, int was used as the return type for all the ELF loader related functions. The returned value is the sum of all loaded program headers "MemSize" fields. Because of the overflow check in elf_ops.h, trying to load an ELF bigger

Re: [PATCH 0/3] linux-aio: allow block devices to limit aio-max-batch

2021-10-14 Thread Stefano Garzarella
Kind ping :-) Thanks, Stefano On Thu, Sep 23, 2021 at 4:31 PM Stefano Garzarella wrote: > > Commit d7ddd0a161 ("linux-aio: limit the batch size using > `aio-max-batch` parameter") added a way to limit the batch size > of Linux AIO backend for the entire AIO context. > &

Re: [PATCH v1] vsock: don't send messages when vsock device is not started

2021-10-14 Thread Stefano Garzarella
Please CC maintainers (MST in this case) On Fri, 2021-10-01 at 18:42 +, Jiang Wang wrote: > Added a check in vhost_vsock_common_send_transport_reset, > and only send messages on event queue when the vsock host > device is started. > > Suggested-by: Stefano Garzarella > Si

Re: [PATCH v2] hw/elf_ops.h: switch to ssize_t for elf loader return type

2021-10-15 Thread Stefano Garzarella
/loader.h | 60 ++-- hw/core/loader.c | 60 +++- 3 files changed, 75 insertions(+), 72 deletions(-) Reviewed-by: Stefano Garzarella

Re: [PATCH v4 2/3] vdpa: Add vhost_vdpa_section_end

2021-10-18 Thread Stefano Garzarella
file changed, 15 insertions(+), 7 deletions(-) Reviewed-by: Stefano Garzarella

Re: [PATCH v4 1/3] vdpa: Skip protected ram IOMMU mappings

2021-10-18 Thread Stefano Garzarella
-by: Jason Wang --- hw/virtio/vhost-vdpa.c | 1 + 1 file changed, 1 insertion(+) Reviewed-by: Stefano Garzarella

Re: [PATCH v4 3/3] vdpa: Check for iova range at mappings changes

2021-10-18 Thread Stefano Garzarella
dpa.c | 62 +- hw/virtio/trace-events | 1 + 3 files changed, 49 insertions(+), 16 deletions(-) Reviewed-by: Stefano Garzarella

Re: [PATCH V4 03/10] vhost-vdpa: prepare for the multiqueue support

2021-10-18 Thread Stefano Garzarella
On Mon, Oct 11, 2021 at 12:28:22PM +0800, Jason Wang wrote: Unlike vhost-kernel, vhost-vdpa adapts a single device multiqueue model. So we need to simply use virtqueue index as the vhost virtqueue index. This is a must for multiqueue to work for vhost-vdpa. Signed-off-by: Jason Wang Message-Id:

Re: [PATCH 7/7] vhost-vdpa: backend feature should set only once

2022-03-30 Thread Stefano Garzarella
&= f; -if (vhost_vdpa_one_time_request(dev)) { +if (!vhost_vdpa_one_time_request(dev)) { r = vhost_vdpa_call(dev, VHOST_SET_BACKEND_FEATURES, &features); if (r) { return -EFAULT; -- 1.8.3.1 With that: Reviewed-by: Stefano Garzarella Unrelated to this p

Re: [PATCH 7/7] vhost-vdpa: backend feature should set only once

2022-03-30 Thread Stefano Garzarella
On Wed, Mar 30, 2022 at 10:12:42AM -0700, Si-Wei Liu wrote: On 3/30/2022 9:24 AM, Stefano Garzarella wrote: On Tue, Mar 29, 2022 at 11:33:17PM -0700, Si-Wei Liu wrote: The vhost_vdpa_one_time_request() branch in vhost_vdpa_set_backend_cap() incorrectly sends down iotls on vhost_dev with non

Re: [PATCH] vdpa: Add missing tracing to batch mapping functions

2022-04-05 Thread Stefano Garzarella
On Tue, Apr 05, 2022 at 08:36:28AM +0200, Eugenio Pérez wrote: These functions were not traced properly. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-vdpa.c | 2 ++ hw/virtio/trace-events | 2 ++ 2 files changed, 4 insertions(+) Reviewed-by: Stefano Garzarella diff --git a/hw/virtio

Re: [PATCH v6 02/13] blkio: add libblkio block driver

2022-10-07 Thread Stefano Garzarella
On Thu, Oct 06, 2022 at 05:34:56PM -0400, Stefan Hajnoczi wrote: libblkio (https://gitlab.com/libblkio/libblkio/) is a library for high-performance disk I/O. It currently supports io_uring, virtio-blk-vhost-user, and virtio-blk-vhost-vdpa with additional drivers under development. One of the rea

Re: [PATCH v6 04/13] block: pass size to bdrv_unregister_buf()

2022-10-07 Thread Stefano Garzarella
ons(+), 11 deletions(-) Reviewed-by: Stefano Garzarella

Re: [PATCH v6 05/13] block: use BdrvRequestFlags type for supported flag fields

2022-10-07 Thread Stefano Garzarella
(-) Reviewed-by: Stefano Garzarella

Re: [PATCH v6 09/13] block: add BlockRAMRegistrar

2022-10-07 Thread Stefano Garzarella
On Thu, Oct 06, 2022 at 05:35:03PM -0400, Stefan Hajnoczi wrote: Emulated devices and other BlockBackend users wishing to take advantage of blk_register_buf() all have the same repetitive job: register RAMBlocks with the BlockBackend using RAMBlockNotifier. Add a BlockRAMRegistrar API to do this

Re: [PATCH 1/2] vhost-user: Refactor vhost acked features saving

2022-10-07 Thread Stefano Garzarella
On Fri, Oct 07, 2022 at 10:01:21AM -0400, Michael S. Tsirkin wrote: On Mon, Sep 26, 2022 at 02:36:40PM +0800, huang...@chinatelecom.cn wrote: From: Hyman Huang(黄勇) Abstract vhost acked features saving into vhost_user_save_acked_features, export it as util function. Signed-off-by: Hyman Huang(

Re: [PATCH] block/io_uring: revert "Use io_uring_register_ring_fd() to skip fd operations"

2022-10-10 Thread Stefano Garzarella
, maybe we can call it on the first submit. This reverts commit e2848bc574fe2715c694bf8fe9a1ba7f78a1125a and 77e3f038af1764983087e3551a0fde9951952c4d. Yep, better to revert for now: Reviewed-by: Stefano Garzarella Should we queue this for stable? Thanks, Stefano Signed-off-by: Sam Li

Re: [PATCH v7 09/13] block: add BlockRAMRegistrar

2022-10-19 Thread Stefano Garzarella
| 1 + 4 files changed, 97 insertions(+) create mode 100644 include/sysemu/block-ram-registrar.h create mode 100644 block/block-ram-registrar.c Reviewed-by: Stefano Garzarella

Re: [PATCH v7 02/13] blkio: add libblkio block driver

2022-10-19 Thread Stefano Garzarella
| 1 + scripts/meson-buildoptions.sh | 3 + 8 files changed, 928 insertions(+), 4 deletions(-) create mode 100644 block/blkio.c Reviewed-by: Stefano Garzarella

Re: [PATCH v7 00/13] blkio: add libblkio BlockDriver

2022-10-19 Thread Stefano Garzarella
I reviewed some patches (the others I do not feel confident of my knowledge). But I think we are in a very good shape and can merge from my point of view. Thanks again for this work, Stefano On Thu, Oct 13, 2022 at 02:58:55PM -0400, Stefan Hajnoczi wrote: v7: - Add nvme-io_uring and virtio-bl

Re: [PATCH v7 13/13] virtio-blk: use BDRV_REQ_REGISTERED_BUF optimization hint

2022-10-19 Thread Stefano Garzarella
mapping/unmapping. Signed-off-by: Stefan Hajnoczi --- include/hw/virtio/virtio-blk.h | 2 ++ hw/block/virtio-blk.c | 39 ++ 2 files changed, 27 insertions(+), 14 deletions(-) Reviewed-by: Stefano Garzarella

Re: [PATCH v7 12/13] blkio: implement BDRV_REQ_REGISTERED_BUF optimization

2022-10-19 Thread Stefano Garzarella
D_BUF is not set. Signed-off-by: Stefan Hajnoczi --- block/blkio.c | 183 +- 1 file changed, 180 insertions(+), 3 deletions(-) Reviewed-by: Stefano Garzarella

Re: [PATCH] aio-posix: split poll check from ready handler

2021-12-01 Thread Stefano Garzarella
On Tue, Nov 30, 2021 at 11:20:57AM +, Stefan Hajnoczi wrote: Adaptive polling measures the execution time of the polling check plus handlers called when a polled event becomes ready. Handlers can take a significant amount of time, making it look like polling was running for a long time when i

Re: [PATCH] aio-posix: split poll check from ready handler

2021-12-02 Thread Stefano Garzarella
On Thu, Dec 02, 2021 at 01:09:23PM +, Stefan Hajnoczi wrote: On Wed, Dec 01, 2021 at 12:55:08PM +0100, Stefano Garzarella wrote: On Tue, Nov 30, 2021 at 11:20:57AM +, Stefan Hajnoczi wrote: > @@ -657,10 +704,7 @@ bool aio_poll(AioContext *ctx, bool blocking) > } > >

Re: [PATCH v3 0/6] aio-posix: split poll check from ready handler

2021-12-09 Thread Stefano Garzarella
ndler function. Stefano Garzarella prompted me to make this refactoring. Great clean up! Thanks for doing this, everything LGTM: Reviewed-by: Stefano Garzarella

Re: [RFC] vhost-vdpa-net: add vhost-vdpa-net host device support

2021-12-09 Thread Stefano Garzarella
t-vdpa [1] https://www.mail-archive.com/qemu-devel@nongnu.org/msg797569.html Stefano presented a plan for vdpa-blk at KVM Forum 2021: https://kvmforum2021.sched.com/event/ke3a/vdpa-blk-unified-hardware-and-software-offload-for-virtio-blk-stefano-garzarella-red-hat It's closer to today's vi

Re: [RFC] vhost-vdpa-net: add vhost-vdpa-net host device support

2021-12-13 Thread Stefano Garzarella
pa-blk > > > > > > * Heavy but more powerful > > > Net: netdev + virtio-net + vhost-vdpa > > > Storage: bdrv + virtio-blk + vhost-vdpa > > > > > > [1] https://www.mail-archive.com/qemu-devel@nongnu.org/msg797569.html > > > > Stefan

Re: [RFC] vhost-vdpa-net: add vhost-vdpa-net host device support

2021-12-13 Thread Stefano Garzarella
On Sat, Dec 11, 2021 at 04:11:04AM +, Longpeng (Mike, Cloud Infrastructure Service Product Dept.) wrote: -Original Message- From: Stefano Garzarella [mailto:sgarz...@redhat.com] Sent: Thursday, December 9, 2021 11:55 PM To: Longpeng (Mike, Cloud Infrastructure Service Product

Re: [PATCH v4 03/18] meson: require liburing >= 0.3

2021-12-15 Thread Stefano Garzarella
linux_io_uring = dependency('liburing', version: '>=0.3', + required: get_option('linux_io_uring'), method: 'pkg-config', kwargs: static_kwargs) endif libxml2 = not_found LGTM! Reviewed-by: Stefano Garzarella

Re: [PATCH v9 00/12] Add VIRTIO sound card

2023-09-14 Thread Stefano Garzarella
On Wed, Sep 13, 2023 at 10:33:07AM +0300, Emmanouil Pitsidianakis wrote: This patch series adds an audio device implementing the recent virtio sound spec (1.2) and a corresponding PCI wrapper device. v9 can be found online at: https://gitlab.com/epilys/qemu/-/tree/virtio-snd-v9 Ref 06e6b17186

Re: [PATCH v9 00/12] Add VIRTIO sound card

2023-09-14 Thread Stefano Garzarella
On Thu, Sep 14, 2023 at 01:02:05PM +0300, Manos Pitsidianakis wrote: On Thu, 14 Sep 2023 12:54, Stefano Garzarella wrote: We are seeing something strange with the virtio-sound Linux driver. It seems that the driver modifies the buffers after exposing them to the device via the avail ring. I

Re: [PATCH] Revert "virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events"

2023-07-05 Thread Stefano Garzarella
Hi Mark, On Wed, Jul 05, 2023 at 07:28:05AM -0500, Mark Kanda wrote: On 7/5/2023 2:15 AM, Stefano Garzarella wrote: This reverts commit 8cc5583abe6419e7faaebc9fbd109f34f4c850f2. That commit causes several problems in Linux as described in the BZ. In particular, after a while, other devices on

Re: [virtio-dev] [RFC PATCH] docs/interop: define STANDALONE protocol feature for vhost-user

2023-07-07 Thread Stefano Garzarella
On Tue, Jul 04, 2023 at 04:02:42PM +0100, Alex Bennée wrote: Stefano Garzarella writes: On Tue, Jul 04, 2023 at 01:36:00PM +0100, Alex Bennée wrote: Currently QEMU has to know some details about the back-end to be able to setup the guest. While various parts of the setup can be delegated to

Re: [RFC PATCH] docs/interop: define STANDALONE protocol feature for vhost-user

2023-07-07 Thread Stefano Garzarella
On Thu, Jul 06, 2023 at 05:31:15PM +0100, Alex Bennée wrote: Alex Bennée writes: Currently QEMU has to know some details about the back-end to be able to setup the guest. While various parts of the setup can be delegated to the backend (for example config handling) this is a very piecemeal ap

Re: [PATCH] Revert "virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events"

2023-07-11 Thread Stefano Garzarella
Hi Mark On Fri, Jul 7, 2023 at 5:58 PM Mark Kanda wrote: [...] > >> On 7/5/2023 2:15 AM, Stefano Garzarella wrote: > >>> This reverts commit 8cc5583abe6419e7faaebc9fbd109f34f4c850f2. > >>> > >>> That commit causes several problems in Linux as desc

Re: [PATCH] Revert "virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events"

2023-07-11 Thread Stefano Garzarella
m not familiar with SCSI and wanted some suggestions on how to proceed. Paolo, Stefan, Linux SCSI maintainers, any suggestion? Thanks, Stefano On Wed, Jul 05, 2023 at 09:15:23AM +0200, Stefano Garzarella wrote: This reverts commit 8cc5583abe6419e7faaebc9fbd109f34f4c850f2. That commit causes

Re: [PATCH] Revert "virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events"

2023-07-12 Thread Stefano Garzarella
On Tue, Jul 11, 2023 at 01:41:31PM -0400, Stefan Hajnoczi wrote: On Tue, 11 Jul 2023 at 13:06, Stefano Garzarella wrote: CCing `./scripts/get_maintainer.pl -f drivers/scsi/virtio_scsi.c`, since I found a few things in the virtio-scsi driver... FYI we have seen that Linux has problems with a

Re: [PATCH] Revert "virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events"

2023-07-12 Thread Stefano Garzarella
On Wed, Jul 12, 2023 at 10:06:56AM +0200, Paolo Bonzini wrote: On 7/11/23 22:21, Mike Christie wrote: What was the issue you are seeing? Was it something like you get the UA. We retry then on one of the retries the sense is not setup correctly, so the scsi error handler runs? That fails and the

Re: [PATCH] Revert "virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events"

2023-07-12 Thread Stefano Garzarella
On Wed, Jul 12, 2023 at 10:35:48AM +0200, Paolo Bonzini wrote: On 7/11/23 19:06, Stefano Garzarella wrote: CCing `./scripts/get_maintainer.pl -f drivers/scsi/virtio_scsi.c`, since I found a few things in the virtio-scsi driver... FYI we have seen that Linux has problems with a QEMU patch for

[PATCH 1/3] scsi: fetch unit attention when creating the request

2023-07-12 Thread Stefano Garzarella
ot;virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events") Reported-by: Thomas Huth Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2176702 Co-developed-by: Paolo Bonzini Signed-off-by: Stefano Garzarella --- include/hw/scsi/scsi.h | 1 + hw/scsi/

[PATCH 2/3] scsi: cleanup scsi_clear_unit_attention()

2023-07-12 Thread Stefano Garzarella
The previous commit moved the unit attention clearing when we create the request. So now we can clean scsi_clear_unit_attention() to handle only the case of the REPORT LUNS command. Suggested-by: Paolo Bonzini Signed-off-by: Stefano Garzarella --- hw/scsi/scsi-bus.c | 28

[PATCH 3/3] scsi: clear unit attention only for REPORT LUNS commands

2023-07-12 Thread Stefano Garzarella
ff-by: Stefano Garzarella --- hw/scsi/scsi-bus.c | 34 +++--- 1 file changed, 11 insertions(+), 23 deletions(-) diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c index f9c95dfb50..fc4b77fdb0 100644 --- a/hw/scsi/scsi-bus.c +++ b/hw/scsi/scsi-bus.c @@ -22,6

[PATCH 0/3] scsi: fix issue with Linux guest and unit attention

2023-07-12 Thread Stefano Garzarella
ogs, and a big thanks to Paolo for his help in preparing this series! Stefano [1] https://lore.kernel.org/qemu-devel/i3od362o6unuimlqna3aaedliaabauj6g545esg7txidd4s44e@bkx5des6zytx/ Stefano Garzarella (3): scsi: fetch unit attention when creating the request scsi: cleanup scsi_clear_unit_

Re: [PATCH] Revert "virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events"

2023-07-12 Thread Stefano Garzarella
On Wed, Jul 12, 2023 at 12:14 PM Stefano Garzarella wrote: > > On Wed, Jul 12, 2023 at 10:06:56AM +0200, Paolo Bonzini wrote: > >On 7/11/23 22:21, Mike Christie wrote: > >>What was the issue you are seeing? > >> > >>Was it something like you get the UA. We r

Re: [PATCH 1/3] scsi: fetch unit attention when creating the request

2023-07-13 Thread Stefano Garzarella
On Wed, Jul 12, 2023 at 06:38:14PM +0200, Paolo Bonzini wrote: On 7/12/23 15:43, Stefano Garzarella wrote: Commit 1880ad4f4e ("virtio-scsi: Batched prepare for cmd reqs") split calls to scsi_req_new() and scsi_req_enqueue() in the virtio-scsi device. This had no drawback, un

vdpa: use io_uring passthrough command for IOCTLs [was Re: [PATCH 1/2] Reduce vdpa initialization / startup overhead]

2023-07-18 Thread Stefano Garzarella
On Thu, Apr 20, 2023 at 6:20 AM Jason Wang wrote: > > On Wed, Apr 19, 2023 at 11:33 PM Eugenio Perez Martin > wrote: > > > > On Wed, Apr 19, 2023 at 12:56 AM wrote: > > > > > > From: Pei Li > > > > > > Currently, part of the vdpa initialization / startup process > > > needs to trigger many ioct

Re: [PATCH] block/blkio: fix module_block.py parsing

2023-07-03 Thread Stefano Garzarella
: fd66dbd424f5 ("blkio: add libblkio block driver") Reported-by: Qing Wang Cc: Stefano Garzarella Signed-off-by: Stefan Hajnoczi --- block/blkio.c | 110 ++ 1 file changed, 57 insertions(+), 53 deletions(-) diff --git a/block/blkio.c b/blo

Re: [PATCH v2] block/blkio: fix module_block.py parsing

2023-07-04 Thread Stefano Garzarella
: fd66dbd424f5 ("blkio: add libblkio block driver") Reported-by: Qing Wang Cc: Stefano Garzarella Signed-off-by: Stefan Hajnoczi --- v2: - Drop unnecessary backslashes [Stefano] --- block/blkio.c | 108 ++ 1 file changed, 56 inserti

Re: [PATCH v4] virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events.

2023-07-04 Thread Stefano Garzarella
Hi Mark, we have a bug [1] possibly related to this patch. I saw this Oracle Linux errata [2] where you reverted this patch, but there are no details. Do you think we should revert it upstream as well? Do you have any details about the problem it causes in Linux? [1] https://bugzilla.redhat.com/

Re: [virtio-dev] [RFC PATCH] docs/interop: define STANDALONE protocol feature for vhost-user

2023-07-04 Thread Stefano Garzarella
On Tue, Jul 04, 2023 at 01:36:00PM +0100, Alex Bennée wrote: Currently QEMU has to know some details about the back-end to be able to setup the guest. While various parts of the setup can be delegated to the backend (for example config handling) this is a very piecemeal approach. This patch sugg

[PATCH] Revert "virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events"

2023-07-05 Thread Stefano Garzarella
: Thomas Huth Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2176702 Cc: qemu-sta...@nongnu.org Cc: Mark Kanda Signed-off-by: Stefano Garzarella --- include/hw/scsi/scsi.h | 1 - hw/scsi/scsi-bus.c | 18 -- hw/scsi/virtio-scsi.c | 2 -- 3 files changed, 21 deletions

Re: [PATCH v3 5/6] block/linux-aio: convert to blk_io_plug_call() API

2023-05-31 Thread Stefano Garzarella
: Eric Blake --- include/block/raw-aio.h | 7 --- block/file-posix.c | 28 block/linux-aio.c | 41 +++-- 3 files changed, 11 insertions(+), 65 deletions(-) LGTM! Reviewed-by: Stefano Garzarella

Re: [PATCH] subprojects: add wrap file for libblkio

2023-09-06 Thread Stefano Garzarella
type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'cargo' Installing `cargo` fixed the issue on my side. I don't know if it is possible, but can we put some dependecy check in the wrap file? Anyway, after installing cargo it works pretty well :-) Tested-by: Stefano Garzarella

Re: [PATCH v2 1/2] vhost: Add worker backend callouts

2023-11-29 Thread Stefano Garzarella
| 28 include/hw/virtio/vhost-backend.h | 14 ++ 2 files changed, 42 insertions(+) Reviewed-by: Stefano Garzarella diff --git a/hw/virtio/vhost-backend.c b/hw/virtio/vhost-backend.c index 17f3fc6a0823..833804dd40f2 100644 --- a/hw/virtio/vhost-backend.

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