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

2022-01-19 Thread Stefano Garzarella
On Mon, Jan 17, 2022 at 08:43:26PM +0800, Longpeng(Mike) via wrote: From: Longpeng Implements the .realize interface. Signed-off-by: Longpeng --- hw/virtio/vdpa-dev.c | 101 +++ include/hw/virtio/vdpa-dev.h | 8 +++ 2 files changed, 109 insertions(+)

Re: [PATCH v2 06/10] vdpa-dev: implement the unrealize interface

2022-01-19 Thread Stefano Garzarella
On Mon, Jan 17, 2022 at 08:43:27PM +0800, Longpeng(Mike) via wrote: From: Longpeng Implements the .unrealize interface. Signed-off-by: Longpeng --- hw/virtio/vdpa-dev.c | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vdpa-dev.c

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

2022-01-19 Thread Stefano Garzarella
On Mon, Jan 17, 2022 at 08:43:25PM +0800, Longpeng(Mike) via wrote: From: Longpeng Implements the .instance_init and the .class_init interface. Signed-off-by: Longpeng --- hw/virtio/vdpa-dev-pci.c | 52 ++- hw/virtio/vdpa-dev.c | 81

Re: [PATCH V2 for-6.2 2/2] block/rbd: workaround for ceph issue #53784

2022-01-17 Thread Stefano Garzarella
--- block/rbd.c | 42 -- 1 file changed, 40 insertions(+), 2 deletions(-) Tested-by: Stefano Garzarella diff --git a/block/rbd.c b/block/rbd.c index 20bb896c4a..d174d51659 100644 --- a/block/rbd.c +++ b/block/rbd.c @@ -1320,6 +1320,7 @@ static int

Re: [PATCH 2/2] block/rbd: workaround for ceph issue #53784

2022-01-11 Thread Stefano Garzarella
Hi Peter, On Tue, Jan 11, 2022 at 10:10:16AM +0100, Peter Lieven wrote: Hi Stefano, thanks for the feedback. Please note that you also need the other patch or you will sooner or later run into another assertion as soon as rbd snapshots are involved. Yep, I tested with the entire series

Re: [PATCH v2] net/tap: Set return code on failure

2022-01-10 Thread Stefano Garzarella
mplementation of tap_probe_vnet_hdr(), in case of error it returns just -1, so it's ok too: Reviewed-by: Stefano Garzarella

Re: [PATCH 2/2] block/rbd: workaround for ceph issue #53784

2022-01-10 Thread Stefano Garzarella
BZ [1] and the test now works correctly! Tested-by: Stefano Garzarella [1] https://bugzilla.redhat.com/show_bug.cgi?id=2034791

Re: [RFC 06/10] vdpa-dev: implement the unrealize interface

2022-01-10 Thread Stefano Garzarella
On Thu, Jan 06, 2022 at 03:23:07AM +, Longpeng (Mike, Cloud Infrastructure Service Product Dept.) wrote: -Original Message- From: Stefano Garzarella [mailto:sgarz...@redhat.com] Sent: Wednesday, January 5, 2022 7:16 PM To: Longpeng (Mike, Cloud Infrastructure Service Product Dept

Re: [PATCH] optionrom: Turn off -fcf-protection

2022-01-05 Thread Stefano Garzarella
+= $(CFLAGS_NOPIE) -ffreestanding -I$(TOPSRC_DIR)/include override CFLAGS += $(call cc-option, -fno-stack-protector) override CFLAGS += $(call cc-option, -m16) +override CFLAGS += $(call cc-option, -fcf-protection=none) LGTM! Reviewed-by: Stefano Garzarella

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

2022-01-05 Thread Stefano Garzarella
On Wed, Jan 05, 2022 at 08:58:54AM +0800, Longpeng(Mike) wrote: From: Longpeng Implements the .instance_init and the .class_init interface. Signed-off-by: Longpeng --- hw/virtio/vdpa-dev-pci.c | 80 +++- hw/virtio/vdpa-dev.c | 68

Re: [RFC 06/10] vdpa-dev: implement the unrealize interface

2022-01-05 Thread Stefano Garzarella
On Wed, Jan 05, 2022 at 08:58:56AM +0800, Longpeng(Mike) wrote: From: Longpeng Implements the .unrealize interface. Signed-off-by: Longpeng --- hw/virtio/vdpa-dev.c | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vdpa-dev.c

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

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

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: [RFC] vhost-vdpa-net: add vhost-vdpa-net host device support

2021-12-13 Thread Stefano Garzarella
; > > > > > * 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 > > > > Stefano prese

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

2021-12-09 Thread Stefano Garzarella
] 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 virtio-net + vhost-net

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

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

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

Re: [PATCH v1] virtio/vhost-vsock: don't double close vhostfd, remove redundant cleanup

2021-11-29 Thread Stefano Garzarella
LGTM: Reviewed-by: Stefano Garzarella

Re: [PATCH 2/2] virtio-blk: support BLKSECDISCARD

2021-11-15 Thread Stefano Garzarella
On Mon, Nov 15, 2021 at 12:52:00PM +0800, yadong...@intel.com wrote: From: Yadong Qi Add new virtio feature: VIRTIO_BLK_F_SECDISCARD. Add new virtio command: VIRTIO_BLK_T_SECDISCARD. Has a proposal been sent out yet to virtio-comment mailing list for discussing these specification changes?

Re: [PATCH] file-posix: Fix alignment after reopen changing O_DIRECT

2021-11-04 Thread Stefano Garzarella
n both cases: Reviewed-by: Stefano Garzarella Stefano

Re: [PATCH] net/vhost-vdpa: fix memory leak in vhost_vdpa_get_max_queue_pairs()

2021-11-02 Thread Stefano Garzarella
On Tue, Nov 02, 2021 at 05:05:21PM +0100, Philippe Mathieu-Daudé wrote: On 11/2/21 16:51, Stefano Garzarella wrote: Use g_autofree to ensure that `config` is freed when vhost_vdpa_get_max_queue_pairs() returns. Reported-by: Coverity (CID 1465228: RESOURCE_LEAK) Fixes: 402378407d ("vhost

[PATCH] net/vhost-vdpa: fix memory leak in vhost_vdpa_get_max_queue_pairs()

2021-11-02 Thread Stefano Garzarella
Use g_autofree to ensure that `config` is freed when vhost_vdpa_get_max_queue_pairs() returns. Reported-by: Coverity (CID 1465228: RESOURCE_LEAK) Fixes: 402378407d ("vhost-vdpa: multiqueue support") Signed-off-by: Stefano Garzarella --- net/vhost-vdpa.c | 2 +- 1 file changed, 1 inser

Re: [PATCH v2 1/3] file-posix: add `aio-max-batch` option

2021-11-02 Thread Stefano Garzarella
On Wed, Oct 27, 2021 at 03:06:37PM +0200, Kevin Wolf wrote: Am 27.10.2021 um 11:23 hat Stefano Garzarella geschrieben: On Wed, Oct 27, 2021 at 06:28:51AM +0200, Markus Armbruster wrote: > Stefano Garzarella writes: > > > Commit d7ddd0a161 ("linux-aio: limit the batch size u

Re: [PATCH v2] vhost-vdpa: Set discarding of RAM broken when initializing the backend

2021-10-28 Thread Stefano Garzarella
v2: - Add ack from Jason - Extend patch description now that RamDiscardManager is upstream. --- hw/virtio/vhost-vdpa.c | 13 + 1 file changed, 13 insertions(+) Reviewed-by: Stefano Garzarella

Re: [PATCH v2 1/3] file-posix: add `aio-max-batch` option

2021-10-27 Thread Stefano Garzarella
On Wed, Oct 27, 2021 at 03:06:37PM +0200, Kevin Wolf wrote: Am 27.10.2021 um 11:23 hat Stefano Garzarella geschrieben: On Wed, Oct 27, 2021 at 06:28:51AM +0200, Markus Armbruster wrote: > Stefano Garzarella writes: > > > Commit d7ddd0a161 ("linux-aio: limit the batch size u

Re: [PATCH v2 1/3] file-posix: add `aio-max-batch` option

2021-10-27 Thread Stefano Garzarella
On Wed, Oct 27, 2021 at 06:28:51AM +0200, Markus Armbruster wrote: Stefano Garzarella writes: 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. The same AIO c

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

2021-10-26 Thread Stefano Garzarella
d, and use it in laio_co_submit() and laio_io_unplug() to limit the Linux AIO batch size more than the limit set by the AIO context. Stefano Garzarella (3): file-posix: add `aio-max-batch` option linux-aio: add `dev_max_batch` parameter to laio_co_submit() linux-aio: add `dev_max_batch` parameter to laio

[PATCH v2 2/3] linux-aio: add `dev_max_batch` parameter to laio_co_submit()

2021-10-26 Thread Stefano Garzarella
Hajnoczi Reviewed-by: Kevin Wolf Signed-off-by: Stefano Garzarella --- include/block/raw-aio.h | 3 ++- block/file-posix.c | 3 ++- block/linux-aio.c | 30 ++ 3 files changed, 26 insertions(+), 10 deletions(-) diff --git a/include/block/raw-aio.h b/include

[PATCH v2 1/3] file-posix: add `aio-max-batch` option

2021-10-26 Thread Stefano Garzarella
size even more to avoid increasing latency. For this reason we add the `aio-max-batch` option to the file backend, which will be used by the next commits to limit the size of batches including requests generated by this device. Suggested-by: Kevin Wolf Reviewed-by: Kevin Wolf Signed-off-b

[PATCH v2 3/3] linux-aio: add `dev_max_batch` parameter to laio_io_unplug()

2021-10-26 Thread Stefano Garzarella
-by: Stefan Hajnoczi Reviewed-by: Kevin Wolf Signed-off-by: Stefano Garzarella --- include/block/raw-aio.h | 3 ++- block/file-posix.c | 2 +- block/linux-aio.c | 8 +--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/include/block/raw-aio.h b/include/block/raw-aio.h

Re: [PATCH 1/3] file-posix: add `aio-max-batch` option

2021-10-25 Thread Stefano Garzarella
On Mon, Oct 25, 2021 at 04:04:21PM +0200, Kevin Wolf wrote: Am 25.10.2021 um 12:20 hat Stefano Garzarella geschrieben: On Thu, Oct 21, 2021 at 04:18:41PM +0100, Stefan Hajnoczi wrote: > On Thu, Sep 23, 2021 at 04:30:58PM +0200, Stefano Garzarella wrote: > > Commit d7ddd0a161 ("li

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

2021-10-25 Thread Stefano Garzarella
On Mon, Oct 25, 2021 at 04:16:54PM +0200, Kevin Wolf wrote: Am 23.09.2021 um 16:30 hat Stefano Garzarella geschrieben: 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 A

Re: [PATCH 1/3] file-posix: add `aio-max-batch` option

2021-10-25 Thread Stefano Garzarella
On Thu, Oct 21, 2021 at 04:18:41PM +0100, Stefan Hajnoczi wrote: On Thu, Sep 23, 2021 at 04:30:58PM +0200, 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

Re: [PATCH v2 0/3] multiboot: Use DMA instead port-based transfer

2021-10-21 Thread Stefano Garzarella
66 ++ 15 files changed, 102 insertions(+), 23 deletions(-) create mode 100644 pc-bios/multiboot_dma.bin create mode 100644 pc-bios/optionrom/multiboot_dma.S -- 2.31.1 Reviewed-by: Stefano Garzarella

Re: [PATCH] multiboot: Use DMA instead port-based transfer

2021-10-19 Thread Stefano Garzarella
ver, this patch LGTM: Tested-by: Stefano Garzarella 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

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

2021-10-18 Thread Stefano Garzarella
| 62 +- hw/virtio/trace-events | 1 + 3 files changed, 49 insertions(+), 16 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 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 v2] hw/elf_ops.h: switch to ssize_t for elf loader return type

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

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

[PATCH 1/2] block/backup: avoid integer overflow of `max-workers`

2021-10-05 Thread Stefano Garzarella
Signed-off-by: Stefano Garzarella --- block/backup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/backup.c b/block/backup.c index 687d2882bc..8b072db5d9 100644 --- a/block/backup.c +++ b/block/backup.c @@ -407,8 +407,8 @@ BlockJob *backup_job_create(const char *

[PATCH 0/2] block: avoid integer overflow of `max-workers` and assert `max_busy_tasks`

2021-10-05 Thread Stefano Garzarella
This series contains a patch that avoids an integer overflow of `max-workers` (struct BackupPerf) by adding a check and a patch that asserts this condition where the problem occurs. Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2009310 Signed-off-by: Stefano Garzarella Stefano Garzarella

[PATCH 2/2] block/aio_task: assert `max_busy_tasks` is greater than 0

2021-10-05 Thread Stefano Garzarella
All code in block/aio_task.c expects `max_busy_tasks` to always be greater than 0. Assert this condition during the AioTaskPool creation where `max_busy_tasks` is set. Signed-off-by: Stefano Garzarella --- block/aio_task.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/aio_task.c

Re: [PATCH v3 2/3] hw/virtio: Acquire RCU read lock in virtqueue_packed_drop_all()

2021-10-05 Thread Stefano Garzarella
On Mon, Oct 04, 2021 at 11:27:12AM +0200, Philippe Mathieu-Daudé wrote: On 10/4/21 11:23, Stefan Hajnoczi wrote: On Mon, Sep 06, 2021 at 12:43:17PM +0200, Philippe Mathieu-Daudé wrote: vring_get_region_caches() must be called with the RCU read lock acquired. virtqueue_packed_drop_all() does

Re: [External] Re: [RFC v7] virtio/vsock: add two more queues for datagram types

2021-09-27 Thread Stefano Garzarella
On Fri, Sep 24, 2021 at 03:27:30PM -0700, Jiang Wang . wrote: On Thu, Sep 23, 2021 at 2:18 AM Stefano Garzarella wrote: [...] > >To explain it, I think the event queue number does not matter for the >vhost and qemu. The vhost-vsock kernel module does not allocate any >da

[PATCH 3/3] linux-aio: add `dev_max_batch` parameter to laio_io_unplug()

2021-09-23 Thread Stefano Garzarella
-by: Stefano Garzarella --- include/block/raw-aio.h | 3 ++- block/file-posix.c | 2 +- block/linux-aio.c | 8 +--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/include/block/raw-aio.h b/include/block/raw-aio.h index ebd042fa27..21fc10c4c9 100644 --- a/include/block/raw

[PATCH 1/3] file-posix: add `aio-max-batch` option

2021-09-23 Thread Stefano Garzarella
size even more to avoid increasing latency. For this reason we add the `aio-max-batch` option to the file backend, which will be used by the next commits to limit the size of batches including requests generated by this device. Suggested-by: Kevin Wolf Signed-off-by: Stefano Garzarella ---

[PATCH 2/3] linux-aio: add `dev_max_batch` parameter to laio_co_submit()

2021-09-23 Thread Stefano Garzarella
This new parameter can be used by block devices to limit the Linux AIO batch size more than the limit set by the AIO context. file-posix backend supports this, passing its `aio-max-batch` option previously added. Add an helper function to calculate the maximum batch size. Signed-off-by: Stefano

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

2021-09-23 Thread Stefano Garzarella
size even more to avoid increasing latency. This series add the `aio-max-batch` option to the file backend, and use it in laio_co_submit() and laio_io_unplug() to limit the Linux AIO batch size more than the limit set by the AIO context. Stefano Garzarella (3): file-posix: add `aio-max-batch` opti

Re: [RFC v7] virtio/vsock: add two more queues for datagram types

2021-09-23 Thread Stefano Garzarella
On Wed, Sep 22, 2021 at 10:36:24AM -0700, Jiang Wang . wrote: On Wed, Sep 22, 2021 at 2:23 AM Stefano Garzarella wrote: On Wed, Sep 22, 2021 at 12:00:24AM +, Jiang Wang wrote: >Datagram sockets are connectionless and unreliable. >The sender does not know the capacity of the re

Re: [RFC v7] virtio/vsock: add two more queues for datagram types

2021-09-22 Thread Stefano Garzarella
On Wed, Sep 22, 2021 at 12:00:24AM +, Jiang Wang wrote: Datagram sockets are connectionless and unreliable. The sender does not know the capacity of the receiver and may send more packets than the receiver can handle. Add two more dedicate virtqueues for datagram sockets, so that it will

[PATCH v2 1/2] vhost-vsock: fix migration issue when seqpacket is supported

2021-09-21 Thread Stefano Garzarella
_SEQPACKET feature bit support") Cc: qemu-sta...@nongnu.org Reported-by: Jiang Wang Signed-off-by: Stefano Garzarella --- v2: - used OnOffAuto `seqpacket` property instead of boolean `features` [stefanha] --- include/hw/virtio/vhost-vsock.h | 3 +++ hw/core/machine.c | 1 +

[PATCH v2 2/2] vhost-vsock: handle common features in vhost-vsock-common

2021-09-21 Thread Stefano Garzarella
vhost_vsock_common_get_features() used by children, and disable `seqpacket` for vhost-user-vsock device for machine types < 6.2. The behavior of vhost-vsock device doesn't change; vhost-user-vsock device now supports `seqpacket` property. Signed-off-by: Stefano Garzarella --- include/hw/virtio/vhost-vsock-commo

[PATCH v2 0/2] vhost-vsock: fixes for seqpacket support

2021-09-21 Thread Stefano Garzarella
, but to simplify the backport I left them separate. v1: https://lore.kernel.org/qemu-devel/20210907124935.147164-1-sgarz...@redhat.com/ v2: - used OnOffAuto `seqpacket` property instead of boolean `features` [stefanha] - moved `seqpacket` property to vhost-vsock-common class Stefano Garzarella (2

Re: [RFC v6] virtio/vsock: add two more queues for datagram types

2021-09-16 Thread Stefano Garzarella
On Thu, Sep 16, 2021 at 08:26:15AM +0200, Stefano Garzarella wrote: On Wed, Sep 15, 2021 at 08:59:17PM -0700, Jiang Wang . wrote: On Tue, Sep 14, 2021 at 5:46 AM Stefan Hajnoczi wrote: On Mon, Sep 13, 2021 at 10:18:43PM +, Jiang Wang wrote: Datagram sockets are connectionless

Re: [RFC v6] virtio/vsock: add two more queues for datagram types

2021-09-16 Thread Stefano Garzarella
On Wed, Sep 15, 2021 at 08:59:17PM -0700, Jiang Wang . wrote: On Tue, Sep 14, 2021 at 5:46 AM Stefan Hajnoczi wrote: On Mon, Sep 13, 2021 at 10:18:43PM +, Jiang Wang wrote: > Datagram sockets are connectionless and unreliable. > The sender does not know the capacity of the receiver > and

Re: [PATCH] vhost-vsock: fix migration issue when seqpacket is supported

2021-09-14 Thread Stefano Garzarella
On Mon, Sep 13, 2021 at 09:46:48AM -0400, Michael S. Tsirkin wrote: On Mon, Sep 13, 2021 at 02:51:42PM +0200, Stefano Garzarella wrote: On Fri, Sep 10, 2021 at 02:35:53AM -0400, Michael S. Tsirkin wrote: > On Thu, Sep 09, 2021 at 10:02:12AM +0100, Daniel P. Berrangé wrote: > > On Th

Re: [RFC v5] virtio/vsock: add two more queues for datagram types

2021-09-13 Thread Stefano Garzarella
On Sun, Sep 12, 2021 at 06:46:03PM +, Jiang Wang wrote: Datagram sockets are connectionless and unreliable. The sender does not know the capacity of the receiver and may send more packets than the receiver can handle. Add two more dedicate virtqueues for datagram sockets, so that it will

Re: [PATCH] vhost-vsock: fix migration issue when seqpacket is supported

2021-09-13 Thread Stefano Garzarella
e, Sep 07, 2021 at 02:49:35PM +0200, Stefano Garzarella wrote: > > > Commit 1e08fd0a46 ("vhost-vsock: SOCK_SEQPACKET feature bit support") > > > enabled the SEQPACKET feature bit. > > > This commit is released with QEMU 6.1, so if we try to migrate a VM where > &

[PATCH v2] block/mirror: fix NULL pointer dereference in mirror_wait_on_conflicts()

2021-09-10 Thread Stefano Garzarella
#4 0x7f0909975820 in ?? () at ../sysdeps/unix/sysv/linux/x86_64/__start_context.S:91 from /usr/lib64/libc.so.6 Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2001404 Fixes: d44dae1a7c ("block/mirror: fix active mirror dead-lock in mirror_wait_on_conflicts") Signed-off-by: Stefa

Re: [PATCH] block/mirror: fix NULL pointer dereference in mirror_wait_on_conflicts()

2021-09-10 Thread Stefano Garzarella
On Fri, Sep 10, 2021 at 01:37:40PM +0300, Vladimir Sementsov-Ogievskiy wrote: 10.09.2021 11:56, Stefano Garzarella wrote: In mirror_iteration() we call mirror_wait_on_conflicts() with `self` parameter set to NULL. Starting from commit d44dae1a7c we dereference `self` pointer

[PATCH] block/mirror: fix NULL pointer dereference in mirror_wait_on_conflicts()

2021-09-10 Thread Stefano Garzarella
#4 0x7f0909975820 in ?? () at ../sysdeps/unix/sysv/linux/x86_64/__start_context.S:91 from /usr/lib64/libc.so.6 Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2001404 Fixes: d44dae1a7c ("block/mirror: fix active mirror dead-lock in mirror_wait_on_conflicts") Signed-off-by: Stefa

Re: [PATCH v1 2/4] virtio: increase virtuqueue size for virtio-scsi and virtio-blk

2021-09-09 Thread Stefano Garzarella
On Wed, Sep 08, 2021 at 06:20:49PM +0300, Denis Plotnikov wrote: On 08.09.2021 16:22, Stefano Garzarella wrote: Message bounced, I use new Denis's email address. On Wed, Sep 08, 2021 at 03:17:16PM +0200, Stefano Garzarella wrote: Hi Denis, I just found this discussion since we still have

Re: [PATCH] vhost-vsock: fix migration issue when seqpacket is supported

2021-09-08 Thread Stefano Garzarella
On Tue, Sep 07, 2021 at 03:47:56PM +0200, Stefano Garzarella wrote: On Tue, Sep 07, 2021 at 02:22:24PM +0100, Daniel P. Berrangé wrote: On Tue, Sep 07, 2021 at 02:49:35PM +0200, Stefano Garzarella wrote: Commit 1e08fd0a46 ("vhost-vsock: SOCK_SEQPACKET feature bit support"

Re: [PATCH v1 2/4] virtio: increase virtuqueue size for virtio-scsi and virtio-blk

2021-09-08 Thread Stefano Garzarella
Message bounced, I use new Denis's email address. On Wed, Sep 08, 2021 at 03:17:16PM +0200, Stefano Garzarella wrote: Hi Denis, I just found this discussion since we still have the following line in hw/core/machine.c: { "vhost-blk-device", "seg_max_adjust", "

Re: [PATCH v1 2/4] virtio: increase virtuqueue size for virtio-scsi and virtio-blk

2021-09-08 Thread Stefano Garzarella
Hi Denis, I just found this discussion since we still have the following line in hw/core/machine.c: { "vhost-blk-device", "seg_max_adjust", "off"} IIUC it was a typo, and I think we should fix it since in the future we can have `vhost-blk-device`. So, I think we have 2 options: 1.

Re: [PATCH v3 0/3] hw/virtio: Minor housekeeping patches

2021-09-07 Thread Stefano Garzarella
rtio: Have virtqueue_get_avail_bytes() pass caches arg to callees include/hw/virtio/virtio.h | 7 +++ hw/virtio/virtio.c | 32 +++- 2 files changed, 22 insertions(+), 17 deletions(-) -- 2.31.1 Reviewed-by: Stefano Garzarella

Re: [PATCH] vhost-vsock: fix migration issue when seqpacket is supported

2021-09-07 Thread Stefano Garzarella
On Tue, Sep 07, 2021 at 02:22:24PM +0100, Daniel P. Berrangé wrote: On Tue, Sep 07, 2021 at 02:49:35PM +0200, Stefano Garzarella wrote: Commit 1e08fd0a46 ("vhost-vsock: SOCK_SEQPACKET feature bit support") enabled the SEQPACKET feature bit. This commit is released with QEMU 6.1, so

[PATCH] vhost-vsock: fix migration issue when seqpacket is supported

2021-09-07 Thread Stefano Garzarella
hine types < 6.1, adding a `features` field to VHostVSock to simplify the handling of upcoming features we will support. Fixes: 1e08fd0a46 ("vhost-vsock: SOCK_SEQPACKET feature bit support") Cc: qemu-sta...@nongnu.org Reported-by: Jiang Wang Signed-off-by: Stefano Garzarella ---

Re: [PATCH v4] virtio/vsock: add two more queues for datagram types

2021-09-07 Thread Stefano Garzarella
On Tue, Sep 07, 2021 at 12:15:30PM +0200, Stefano Garzarella wrote: On Sun, Sep 05, 2021 at 11:08:34AM -0700, Jiang Wang . wrote: On Mon, Aug 9, 2021 at 3:58 AM Stefano Garzarella wrote: On Thu, Aug 05, 2021 at 12:07:02PM -0700, Jiang Wang . wrote: On Wed, Aug 4, 2021 at 1:13 AM Stefano

Re: [PATCH v4] virtio/vsock: add two more queues for datagram types

2021-09-07 Thread Stefano Garzarella
On Sun, Sep 05, 2021 at 11:08:34AM -0700, Jiang Wang . wrote: On Mon, Aug 9, 2021 at 3:58 AM Stefano Garzarella wrote: On Thu, Aug 05, 2021 at 12:07:02PM -0700, Jiang Wang . wrote: >On Wed, Aug 4, 2021 at 1:13 AM Stefano Garzarella wrote: >> On Tue, Aug 03, 2021 at 11:41:32PM +00

Re: [PATCH 0/2] iothread: cleanup after adding a new parameter to IOThread

2021-09-06 Thread Stefano Garzarella
Ping :-) Looks like it went into the crack during feature freeze, should I resend it? On Tue, Jul 27, 2021 at 04:59:34PM +0200, Stefano Garzarella wrote: We recently added a new parameter (aio-max-batch) to IOThread. This series cleans up the code a bit, no functional changes. Stefano

Re: [RFC PATCH 3/3] hw/virtio: Have virtqueue_get_avail_bytes() pass caches arg to callees

2021-09-02 Thread Stefano Garzarella
On Thu, Sep 02, 2021 at 01:12:33PM +0100, Stefan Hajnoczi wrote: On Wed, Sep 01, 2021 at 05:55:38PM +0200, Stefano Garzarella wrote: On Thu, Aug 26, 2021 at 07:26:58PM +0200, Philippe Mathieu-Daudé wrote: > Both virtqueue_packed_get_avail_bytes() and > virtqueue_split_get_avail_bytes()

Re: [RFC PATCH 3/3] hw/virtio: Have virtqueue_get_avail_bytes() pass caches arg to callees

2021-09-01 Thread Stefano Garzarella
On Thu, Aug 26, 2021 at 07:26:58PM +0200, Philippe Mathieu-Daudé wrote: Both virtqueue_packed_get_avail_bytes() and virtqueue_split_get_avail_bytes() access the region cache, but their caller also does. Simplify by having virtqueue_get_avail_bytes calling both with RCU lock held, and passing the

Re: [PATCH 2/3] hw/virtio: Remove NULL check in virtio_free_region_cache()

2021-09-01 Thread Stefano Garzarella
;avail); address_space_cache_destroy(>used); -- 2.31.1 Reviewed-by: Stefano Garzarella

Re: [PATCH 1/3] hw/virtio: Document virtio_queue_packed_empty_rcu is called within RCU

2021-09-01 Thread Stefano Garzarella
int virtio_queue_split_empty(VirtQueue *vq) return empty; } +/* Called within rcu_read_lock(). */ static int virtio_queue_packed_empty_rcu(VirtQueue *vq) { struct VRingPackedDesc desc; -- 2.31.1 Reviewed-by: Stefano Garzarella

Re: [qemu-web PATCH] Fix link to Windows page in Wiki

2021-09-01 Thread Stefano Garzarella
CCing Paolo and Thomas On Wed, Aug 25, 2021 at 06:43:56PM +0200, Helge Konetzka wrote: The appended patch fixes the link to Wiki Windows page on Website Download Sources page. Furthermore I would like to propose to change the instructions for Native builds with MSYS2 on Wiki Windows page.

Re: [PATCH] hw/virtio: Fix leak of host-notifier memory-region

2021-08-12 Thread Stefano Garzarella
g_free(name); if (virtio_queue_set_host_notifier_mr(vdev, queue_idx, >mr, true)) { +object_unparent(OBJECT(>mr)); munmap(addr, page_size); return -1; } -- 1.8.3.1 Reviewed-by: Stefano Garzarella

Re: [PATCH] block/rbd: implement bdrv_co_block_status

2021-08-10 Thread Stefano Garzarella
On Mon, Aug 09, 2021 at 03:41:36PM +0200, Peter Lieven wrote: Please, can you add a description? For example also describing what happens if RBD image does not support RBD_FEATURE_FAST_DIFF. Signed-off-by: Peter Lieven --- block/rbd.c | 119

Re: [PATCH v4] virtio/vsock: add two more queues for datagram types

2021-08-09 Thread Stefano Garzarella
On Thu, Aug 05, 2021 at 12:07:02PM -0700, Jiang Wang . wrote: On Wed, Aug 4, 2021 at 1:13 AM Stefano Garzarella wrote: On Tue, Aug 03, 2021 at 11:41:32PM +, Jiang Wang wrote: >Datagram sockets are connectionless and unreliable. >The sender does not know the capacity of the re

Re: [RFC v3] virtio/vsock: add two more queues for datagram types

2021-08-09 Thread Stefano Garzarella
On Thu, Aug 05, 2021 at 12:00:05PM -0700, Jiang Wang . wrote: On Tue, Aug 3, 2021 at 11:49 PM Stefano Garzarella wrote: On Wed, Aug 4, 2021 at 8:41 AM Stefano Garzarella wrote: > > On Tue, Aug 03, 2021 at 11:58:27AM -0700, Jiang Wang . wrote: > >On Wed, Jul 7, 2021 at 10:2

Re: [PATCH v2] block/io_uring: resubmit when result is -EAGAIN

2021-08-05 Thread Stefano Garzarella
On Wed, Aug 04, 2021 at 06:52:15PM +0200, Kevin Wolf wrote: Am 04.08.2021 um 16:50 hat Stefano Garzarella geschrieben: On Mon, Aug 02, 2021 at 02:40:36PM +0200, Kevin Wolf wrote: > Am 29.07.2021 um 11:10 hat Fabian Ebner geschrieben: > > Linux SCSI can throw spurious -EAGAIN in so

Re: [PATCH v2] block/io_uring: resubmit when result is -EAGAIN

2021-08-04 Thread Stefano Garzarella
should allow block jobs to complete, even if such spurious errors are encountered. Co-authored-by: Stefan Hajnoczi Reviewed-by: Stefano Garzarella Signed-off-by: Fabian Ebner --- Changes from v1: * Focus on what's relevant for the patch itself in the commit message. * Add Stefan's

Re: [PATCH v4] virtio/vsock: add two more queues for datagram types

2021-08-04 Thread Stefano Garzarella
On Tue, Aug 03, 2021 at 11:41:32PM +, Jiang Wang wrote: Datagram sockets are connectionless and unreliable. The sender does not know the capacity of the receiver and may send more packets than the receiver can handle. Add two more dedicate virtqueues for datagram sockets, so that it will

Re: [RFC v3] virtio/vsock: add two more queues for datagram types

2021-08-04 Thread Stefano Garzarella
On Wed, Aug 4, 2021 at 8:41 AM Stefano Garzarella wrote: > > On Tue, Aug 03, 2021 at 11:58:27AM -0700, Jiang Wang . wrote: > >On Wed, Jul 7, 2021 at 10:27 AM Stefano Garzarella > >wrote: > >> On Wed, Jul 07, 2021 at 09:52:46AM -0700, Jiang Wang . wrote: > >

Re: [RFC v3] virtio/vsock: add two more queues for datagram types

2021-08-04 Thread Stefano Garzarella
On Tue, Aug 03, 2021 at 11:58:27AM -0700, Jiang Wang . wrote: On Wed, Jul 7, 2021 at 10:27 AM Stefano Garzarella wrote: On Wed, Jul 07, 2021 at 09:52:46AM -0700, Jiang Wang . wrote: >On Wed, Jul 7, 2021 at 1:33 AM Stefano Garzarella wrote: >> On Tue, Jul 06, 2021 at 10:26:07PM +00

Re: [PATCH v2] block/io_uring: resubmit when result is -EAGAIN

2021-07-29 Thread Stefano Garzarella
if such spurious errors are encountered. Co-authored-by: Stefan Hajnoczi Reviewed-by: Stefano Garzarella Signed-off-by: Fabian Ebner --- Changes from v1: * Focus on what's relevant for the patch itself in the commit message. * Add Stefan's comment. * Add Stefano's R-b tag (I hope that's fine

[PATCH] MAINTAINERS: add Stefano Garzarella as io_uring reviewer

2021-07-28 Thread Stefano Garzarella
I've been working with io_uring for a while so I'd like to help with reviews. Signed-off-by: Stefano Garzarella --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 42ac45c3e5..1776d0950b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3257,6

Re: [PATCH] block/io_uring: resubmit when result is -EAGAIN

2021-07-28 Thread Stefano Garzarella
plications are, but retrying upon EAGAIN does not sound like a bad thing to my inexperienced ears. Yeah, that doesn't sound bad. For kernels that don't have the patch applied, I don't think there's much we can do about it, so this change seems okay to me: Reviewed-by: Stefano Garzarella

[PATCH 0/2] iothread: cleanup after adding a new parameter to IOThread

2021-07-27 Thread Stefano Garzarella
We recently added a new parameter (aio-max-batch) to IOThread. This series cleans up the code a bit, no functional changes. Stefano Garzarella (2): iothread: rename PollParamInfo to IOThreadParamInfo iothread: use IOThreadParamInfo in iothread_[set|get]_param() iothread.c | 28

[PATCH 2/2] iothread: use IOThreadParamInfo in iothread_[set|get]_param()

2021-07-27 Thread Stefano Garzarella
parameter with `IOThreadParamInfo *info`. Suggested-by: Kevin Wolf Signed-off-by: Stefano Garzarella --- iothread.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/iothread.c b/iothread.c index a73e560ba0..0f98af0f2a 100644 --- a/iothread.c +++ b/iothread.c @@ -231,

[PATCH 1/2] iothread: rename PollParamInfo to IOThreadParamInfo

2021-07-27 Thread Stefano Garzarella
Kevin Wolf Signed-off-by: Stefano Garzarella --- iothread.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/iothread.c b/iothread.c index ddbbde61f7..a73e560ba0 100644 --- a/iothread.c +++ b/iothread.c @@ -215,18 +215,18 @@ static void iothread_complete(UserCrea

[PATCH for-6.1? v2 2/3] iothread: add aio-max-batch parameter

2021-07-21 Thread Stefano Garzarella
allows us to control the maximum batch size to reduce the latency that requests might accumulate while queued in the AIO engine queue. If `aio-max-batch` is equal to 0 (default value), the AIO engine will use its default maximum batch size value. Signed-off-by: Stefano Garzarella --- Notes: v2

[PATCH for-6.1? v2 1/3] iothread: generalize iothread_set_param/iothread_get_param

2021-07-21 Thread Stefano Garzarella
Changes in preparation for next patches where we add a new parameter not related to the poll mechanism. Let's add two new generic functions (iothread_set_param and iothread_get_param) that we use to set and get IOThread parameters. Signed-off-by: Stefano Garzarella --- iothread.c | 27

[PATCH for-6.1? v2 3/3] linux-aio: limit the batch size using `aio-max-batch` parameter

2021-07-21 Thread Stefano Garzarella
represents a good tradeoff between the latency increase while a request is queued and the cost of the io_submit(2) system call. Signed-off-by: Stefano Garzarella --- Notes: v2: - limit the batch with the number of available events [stefanha] block/linux-aio.c | 9 - 1 file

[PATCH for-6.1? v2 0/3] linux-aio: limit the batch size to reduce queue latency

2021-07-21 Thread Stefano Garzarella
e=/dev/vdb \ --rw=${TEST} --bs=${BS} --iodepth=${IODEPTH} --numjobs=16 Next steps: - benchmark io_uring and use `aio-max-batch` also there - make MAX_EVENTS parametric adding a new `aio-max-events` parameter Thanks, Stefano Stefano Garzarella (3): iothread: generalize iothread

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