Re: [PATCH 3/6] tests/boot_linux_console: fix extract_from_deb() comment

2020-01-30 Thread Stefano Garzarella
On Mon, Jan 27, 2020 at 04:36:31PM +, Liam Merwick wrote: > The second param in extract_from_deb() is 'path' not 'file' > > Signed-off-by: Liam Merwick > --- > tests/acceptance/boot_linux_console.py | 2 +- > 1 file changed, 1 insertion(+), 1 deleti

Re: [PATCH 1/6] tests/boot_linux_console: add microvm acceptance test

2020-01-30 Thread Stefano Garzarella
est booting a > compressed kernel using either machine class. > > Signed-off-by: Liam Merwick > --- > tests/acceptance/boot_linux_console.py | 15 +-- > 1 file changed, 13 insertions(+), 2 deletions(-) Reviewed-by: Stefano Garzarella > > diff --git

Re: [PATCH 4/6] travis.yml: install rpm2cpio for acceptance tests

2020-01-30 Thread Stefano Garzarella
rtion(+) Reviewed-by: Stefano Garzarella > > diff --git a/.travis.yml b/.travis.yml > index 1ae645e9fcec..3d8c2a38e679 100644 > --- a/.travis.yml > +++ b/.travis.yml > @@ -278,6 +278,7 @@ matrix: > - python3-pil > - python3-pip >

Re: [PATCH 5/6] tests/boot_linux_console: add extract_from_rpm method

2020-01-30 Thread Stefano Garzarella
+process.run("rpm2cpio %s | cpio -id %s" % (rpm, path), shell=True) > +os.chdir(cwd) > +return self.workdir + '/' + path ^ Is the extra slash needed? (just because the extract_from_deb() doesn't put

Re: [PATCH 6/6] tests/boot_linux_console: add PVH acceptance tests

2020-01-30 Thread Stefano Garzarella
On Mon, Jan 27, 2020 at 04:36:34PM +, Liam Merwick wrote: > Add tests to boot an uncompressed kernel using the x86/HVM direct boot ABI. > The vmlinux binary is obtained from a small RPM for Kata containers and > extracted using the new extract_from_rpm() method. > > Signed-off-by: Liam Merwick

Re: [PATCH 2/6] tests/boot_linux_console: add BIOS acceptance test

2020-01-30 Thread Stefano Garzarella
On Thu, Jan 30, 2020 at 04:28:52PM +, Liam Merwick wrote: > On 30/01/2020 15:34, Liam Merwick wrote: > > On 30/01/2020 11:27, Stefano Garzarella wrote: > > > Hi Liam, > > > > > > On Mon, Jan 27, 2020 at 04:36:30PM +, Liam Merwick wrote: > > &g

Re: [PATCH 0/3] virtio: add vhost-user-vsock device

2020-05-22 Thread Stefano Garzarella
On Thu, May 21, 2020 at 03:35:59PM +0100, Stefan Hajnoczi wrote: > On Fri, May 15, 2020 at 05:21:07PM +0200, Stefano Garzarella wrote: > > This series add vhost-user-vsock base device and its PCI version > > (vhost-user-vsock-pci). > > The vhost-user-vsock device can be

[PATCH v2 0/3] virtio: add vhost-user-vsock device

2020-05-22 Thread Stefano Garzarella
Rust using crates from Cloud Hypervisor. The application implements the Firecracker hybrid vsock (vsock over unix domain socket) [2] The vhost-user-vsock-pci device can be tested following these steps: # build vhost-user-vsock application git clone https://github.com/stefano-garzar

[PATCH v2 3/3] virtio: add vhost-user-vsock-pci device

2020-05-22 Thread Stefano Garzarella
Add the PCI version of vhost-user-vsock Launch QEMU like this: qemu -chardev socket,path=/tmp/vm.vsock,id=chr0 \ -device vhost-user-vsock-pci,chardev=chr0 Signed-off-by: Stefano Garzarella --- hw/virtio/vhost-user-vsock-pci.c | 84 hw/virtio

[PATCH v2 2/3] virtio: add vhost-user-vsock base device

2020-05-22 Thread Stefano Garzarella
This patch introduces a vhost-user device for vsock, using the vhost-vsock-common parent class. The vhost-user-vsock device can be used to implement the virtio-vsock device emulation in user-space. Signed-off-by: Stefano Garzarella --- v1 -> v2: - removed live migration code since vhost-u

[PATCH v2 1/3] vhost-vsock: add vhost-vsock-common abstraction

2020-05-22 Thread Stefano Garzarella
This patch prepares the introduction of vhost-user-vsock, moving the common code usable for both vhost-vsock and vhost-user-vsock devices, in the new vhost-vsock-common parent class. While moving the code, fixed checkpatch warnings about block comments. Signed-off-by: Stefano Garzarella

Re: About the PVH in Seabios

2020-05-26 Thread Stefano Garzarella
Hi Yang, On Tue, May 26, 2020 at 03:18:26PM +0800, Yang Zhong wrote: > Hello all, > > The current PVH has been implemented in Qemu and Qboot/uefi, i am not > familiar with the PVH implementation history, and found there is no > PVH support in Seabios, my question is do we have plan to support > P

Re: [PATCH] scripts/git.orderfile: Display decodetree before C source

2020-01-07 Thread Stefano Garzarella
declarations). > > Signed-off-by: Philippe Mathieu-Daudé > --- > scripts/git.orderfile | 3 +++ > 1 file changed, 3 insertions(+) Reviewed-by: Stefano Garzarella > > diff --git a/scripts/git.orderfile b/scripts/git.orderfile > index e89790941c..1f747b583a 100644 &

Re: [PATCH v2 1/1] block/rbd: Add support for ceph namespaces

2020-01-08 Thread Stefano Garzarella
Hi Florian, the patch LGTM but there are few style issues to fix: On Tue, Jan 07, 2020 at 12:13:40PM +0100, Florian Florensa wrote: > Starting from ceph Nautilus, RBD has support for namespaces, allowing > for finer grain ACLs on images inside a pool, and tenant isolation. > > In the rbd cli tool

Re: [PATCH v3 1/1] block/rbd: Add support for ceph namespaces

2020-01-10 Thread Stefano Garzarella
> block/rbd.c | 44 +++- > qapi/block-core.json | 4 > 2 files changed, 35 insertions(+), 13 deletions(-) Reviewed-by: Stefano Garzarella Thanks, Stefano > > diff --git a/block/rbd.c b/block/rbd.c > index 027cbcc

Re: [PATCH v3 04/15] block/io_uring: implements interfaces for io_uring

2020-01-13 Thread Stefano Garzarella
M, but I don't have a lot of experience with io_uring until now, so Acked-by: Stefano Garzarella I really interested on it and I'll try to contribute on this new AIO engine. > > diff --git a/MAINTAINERS b/MAINTAINERS > index 740401bcbb..fc7f53b229 100644 > --- a/MAINTAINERS >

Re: [PATCH v3 08/15] block/file-posix.c: extend to use io_uring

2020-01-13 Thread Stefano Garzarella
On Wed, Dec 18, 2019 at 04:32:21PM +, Stefan Hajnoczi wrote: > From: Aarushi Mehta > > Signed-off-by: Aarushi Mehta > Reviewed-by: Maxim Levitsky > Signed-off-by: Stefan Hajnoczi > --- > block/file-posix.c | 95 -- > 1 file changed, 75 insertion

Re: [PATCH v3 00/15] io_uring: add Linux io_uring AIO engine

2020-01-13 Thread Stefano Garzarella
The series LGTM, just some comments on patches 4 and 8. I succefully tried iotests on raw and qcow2 with io_uring, so Acked-by: Stefano Garzarella Thanks, Stefano On Wed, Dec 18, 2019 at 04:32:13PM +, Stefan Hajnoczi wrote: > v12: > * Reword BlockdevAioOptions QAPI schema

Re: [PATCH] vhost-vsock: delete vqs in vhost_vsock_unrealize to avoid memleaks

2020-01-14 Thread Stefano Garzarella
> hw/virtio/vhost-vsock.c | 9 +++-- > include/hw/virtio/vhost-vsock.h | 2 ++ > 2 files changed, 9 insertions(+), 2 deletions(-) Reviewed-by: Stefano Garzarella > > diff --git a/hw/virtio/vhost-vsock.c b/hw/virtio/vhost-vsock.c > index f5744363a8..896c0174c1 100

Re: [PATCH] vhost-vsock: delete vqs in vhost_vsock_unrealize to avoid memleaks

2020-01-14 Thread Stefano Garzarella
On Tue, Jan 14, 2020 at 5:45 PM Stefan Hajnoczi wrote: > > On Tue, Jan 14, 2020 at 03:52:29PM +0800, pannengy...@huawei.com wrote: > > From: Pan Nengyuan > > > > Receive/transmit/event vqs forgot to cleanup in vhost_vsock_unrealize. This > > patch save receive/transmit vq pointer in realize() and

Re: [PATCH v2] vhost-vsock: delete vqs in vhost_vsock_unrealize to avoid memleaks

2020-01-15 Thread Stefano Garzarella
Changes V2 to V1: > - delete virtqueues after vhost cleanup to avoid use-after-free > - aslo delete virtqueues in the error path of realize() > --- > hw/virtio/vhost-vsock.c | 12 ++-- > include/hw/virtio/vhost-vsock.h | 2 ++ > 2 files changed, 12 insertio

Re: [PATCH v2] qcow2: Use a GString in report_unsupported_feature()

2020-01-16 Thread Stefano Garzarella
essage. > > Suggested-by: Philippe Mathieu-Daudé > Signed-off-by: Alberto Garcia > Reviewed-by: Alex Bennée > --- > block/qcow2.c | 23 +++ > 1 file changed, 11 insertions(+), 12 deletions(-) Reviewed-by: Stefano Garzarella > > v2: Use g_autop

Re: [PATCH] block/rbd: Add support for ceph namespaces

2019-12-19 Thread Stefano Garzarella
opening pool %s", opts->pool); > goto failed_shutdown; > } > +/* > + * Set the namespace after opening the io context on the pool, > + * if nspace == NULL or if nspace == "", it is just as we did nothing > + */ > +rados_ioctx_set

Re: [PATCH] block/rbd: Add support for ceph namespaces

2019-12-20 Thread Stefano Garzarella
On Fri, Dec 20, 2019 at 09:56:51AM -0500, Jason Dillaman wrote: > On Fri, Dec 20, 2019 at 9:11 AM Florian Florensa wrote: > > > > Hello Stefano and Jason, > > > > First of all thanks for the quick reply, > > Response inline belowe > > > Hi Florian, > > > > > > I think we need to add (Since: 5.0).

Re: [PATCH v1] virtio-mmio: update queue size on guest write

2019-12-24 Thread Stefano Garzarella
changed, 2 insertions(+), 1 deletion(-) When I reviewed the Michael's patch for pci transport, I planned to do the same but I postponed for several reason. Thanks for doing that! Reviewed-by: Stefano Garzarella > > diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c >

Re: [PATCH] hw/rtc/mc146818: Add missing dependency on ISA Bus

2019-12-24 Thread Stefano Garzarella
ile changed, 1 insertion(+) Reviewed-by: Stefano Garzarella > > diff --git a/hw/rtc/Kconfig b/hw/rtc/Kconfig > index 45daa8d655..3dc2dd6888 100644 > --- a/hw/rtc/Kconfig > +++ b/hw/rtc/Kconfig > @@ -17,6 +17,7 @@ config TWL92230 > depends on I2C > > confi

Re: [PATCH 2/3] iothread: add aio-max-batch parameter

2021-07-19 Thread Stefano Garzarella
On Tue, Jul 13, 2021 at 03:51:15PM +0100, Stefan Hajnoczi wrote: On Wed, Jul 07, 2021 at 05:00:18PM +0200, Stefano Garzarella wrote: diff --git a/qapi/misc.json b/qapi/misc.json index 156f98203e..f64bb69f74 100644 --- a/qapi/misc.json +++ b/qapi/misc.json @@ -86,6 +86,9 @@ # @poll-shrink: how

Re: [PATCH 3/3] linux-aio: limit the batch size using `aio-max-batch` parameter

2021-07-19 Thread Stefano Garzarella
On Tue, Jul 13, 2021 at 03:58:04PM +0100, Stefan Hajnoczi wrote: On Wed, Jul 07, 2021 at 05:00:19PM +0200, Stefano Garzarella wrote: @@ -371,7 +375,7 @@ static int laio_do_submit(int fd, struct qemu_laiocb *laiocb, off_t offset, s->io_q.in_queue++; if (!s->io_q.b

Re: [PATCH] io_uring: move LuringState typedef to block/aio.h

2021-07-20 Thread Stefano Garzarella
forward reference to the struct. Signed-off-by: Paolo Bonzini --- block/io_uring.c| 4 ++-- include/block/aio.h | 8 include/block/raw-aio.h | 1 - 3 files changed, 6 insertions(+), 7 deletions(-) Reviewed-by: Stefano Garzarella

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

2021-07-21 Thread Stefano Garzarella
--filename=/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: generaliz

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

2021-07-21 Thread Stefano Garzarella
ks and it 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

[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

[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 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 2/2] iothread: use IOThreadParamInfo in iothread_[set|get]_param()

2021-07-27 Thread Stefano Garzarella
aque` 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.

[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

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

2021-07-28 Thread Stefano Garzarella
what all the implications 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] 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

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

2021-07-29 Thread Stefano Garzarella
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 h

Re: [PATCH 1/7] vhost: Add Error parameter to vhost_dev_init()

2021-06-10 Thread Stefano Garzarella
| 4 +--- hw/scsi/vhost-user-scsi.c| 4 +--- hw/virtio/vhost-user-fs.c| 3 +-- hw/virtio/vhost-user-vsock.c | 3 +-- hw/virtio/vhost-vsock.c | 3 +-- hw/virtio/vhost.c| 16 ++-- 11 files changed, 29 insertions(+), 25 deletions(-) Reviewed-by: Stefano

Re: [PATCH 2/7] vhost: Distinguish errors in vhost_backend_init()

2021-06-10 Thread Stefano Garzarella
irtio/vhost.c | 13 +- 5 files changed, 32 insertions(+), 29 deletions(-) Reviewed-by: Stefano Garzarella

Re: [PATCH 3/7] vhost: Return 0/-errno in vhost_dev_init()

2021-06-10 Thread Stefano Garzarella
-user.c| 10 +++--- hw/virtio/vhost-vdpa.c| 4 +++- hw/virtio/vhost.c | 8 4 files changed, 17 insertions(+), 9 deletions(-) Reviewed-by: Stefano Garzarella

Re: [PATCH 4/7] vhost-user-blk: Add Error parameter to vhost_user_blk_start()

2021-06-10 Thread Stefano Garzarella
, 15 insertions(+), 16 deletions(-) Reviewed-by: Stefano Garzarella

Re: [PATCH 5/7] vhost: Distinguish errors in vhost_dev_get_config()

2021-06-10 Thread Stefano Garzarella
error_setg_errno(errp, -ret, "vhost_get_config failed"); +} +return ret; } -return -1; +error_setg(errp, "vhost_dev_get_config not implemented"); ^ Maybe I'd replace s/vhost_dev_get_config/vhost_get_config But it's not that important: Reviewed-by: Stefano Garzarella

Re: [PATCH 6/7] vhost-user-blk: Factor out vhost_user_blk_realize_connect()

2021-06-10 Thread Stefano Garzarella
this while touching the code. Signed-off-by: Kevin Wolf --- hw/block/vhost-user-blk.c | 48 ++- 1 file changed, 32 insertions(+), 16 deletions(-) Reviewed-by: Stefano Garzarella

Re: [PATCH 7/7] vhost-user-blk: Implement reconnection during realize

2021-06-10 Thread Stefano Garzarella
On Wed, Jun 09, 2021 at 05:46:58PM +0200, Kevin Wolf wrote: Commit dabefdd6 removed code that was supposed to try reconnecting during .realize(), but actually just crashed and had several design problems. This adds the feature back without the crash in simple cases while also fixing some design

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

2021-06-10 Thread Stefano Garzarella
On Thu, Jun 10, 2021 at 12:14: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 not

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

2021-08-03 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: [RFC v3] virtio/vsock: add two more queues for datagram types

2021-08-03 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: [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 not

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 Ste

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

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] 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, &n->mr, true)) { +object_unparent(OBJECT(&n->mr)); munmap(addr, page_size); return -1; } -- 1.8.3.1 Reviewed-by: Stefano Garzarella

Re: [PATCH 07/18] vhost-vdpa: tweak the error label in vhost_vdpa_add()

2021-07-06 Thread Stefano Garzarella
On Tue, Jul 06, 2021 at 04:10:22PM +0800, Jason Wang wrote: 在 2021/7/6 下午4:03, Jason Wang 写道: 在 2021/6/23 下午11:03, Stefano Garzarella 写道: On Mon, Jun 21, 2021 at 12:16:39PM +0800, Jason Wang wrote: Introduce new error label to avoid the unnecessary checking of net pointer. Fixes

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

2021-07-07 Thread Stefano Garzarella
On Tue, Jul 06, 2021 at 10:26:07PM +, 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 not

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

2021-07-07 Thread Stefano Garzarella
c adding a new `aio-max-events` parameter Comments and suggestions are welcome :-) Thanks, Stefano Stefano Garzarella (3): iothread: generalize iothread_set_param/iothread_get_param iothread: add aio-max-batch parameter linux-aio: limit the batch size using `aio-max-batch` parameter qapi

[PATCH 1/3] iothread: generalize iothread_set_param/iothread_get_param

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

[PATCH 2/3] iothread: add aio-max-batch parameter

2021-07-07 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 --- qapi

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

2021-07-07 Thread Stefano Garzarella
ks and it 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 --- block/linux-aio.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/block/linux-aio.c b/blo

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

2021-07-07 Thread Stefano Garzarella
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 +, Jiang Wang wrote: >Datagram sockets are connectionless and unreliable. >The sender does not know the capacity of the receive

Re: [RFC PATCH v1] vhost-vsock: SOCK_SEQPACKET feature bit support

2021-06-22 Thread Stefano Garzarella
On Mon, Jun 21, 2021 at 05:07:41PM +0300, Arseny Krasnov wrote: This adds processing of VIRTIO_VSOCK_F_SEQPACKET features bit. Guest negotiates it with vhost, thus both will know that SOCK_SEQPACKET supported by peer. Signed-off-by: Arseny Krasnov --- hw/virtio/vhost-vsock.c

Re: [PATCH v2] vhost-vsock: SOCK_SEQPACKET feature bit support

2021-06-22 Thread Stefano Garzarella
ude "standard-headers/linux/virtio_config.h" +/* The feature bitmap for virtio vsock */ +#define VIRTIO_VSOCK_F_SEQPACKET 1 /* SOCK_SEQPACKET supported */ + struct virtio_vsock_config { uint64_t guest_cid; } QEMU_PACKED; -- 2.25.1 LGTM: Reviewed-by: Stefano Garzarella

Re: [PATCH v3] vhost-vsock: SOCK_SEQPACKET feature bit support

2021-06-22 Thread Stefano Garzarella
headers/linux/virtio_ids.h" #include "standard-headers/linux/virtio_config.h" +/* The feature bitmap for virtio vsock */ +#define VIRTIO_VSOCK_F_SEQPACKET 1 /* SOCK_SEQPACKET supported */ + struct virtio_vsock_config { uint64_t guest_cid; } QEMU_PACKED; -- 2.25.1 Reviewed-by: Stefano Garzarella

Re: [PATCH 03/18] vhost_net: do not assume nvqs is always 2

2021-06-23 Thread Stefano Garzarella
@@ static int vhost_vdpa_add(NetClientState *ncs, void *be) options.net_backend = ncs; options.opaque = be; options.busyloop_timeout = 0; +options.nvqs = 2; net = vhost_net_init(&options); if (!net) { -- 2.25.1 Reviewed-by: Stefano Garzarella

Re: [PATCH 04/18] vhost-vdpa: remove the unnecessary check in vhost_vdpa_add()

2021-06-23 Thread Stefano Garzarella
ailed to init vhost_net for queue"); goto err; } -if (s->vhost_net) { -vhost_net_cleanup(s->vhost_net); -g_free(s->vhost_net); -} Maybe we can add an assert() to discover future issues, but I don't have a strong opinion. It is fine: Reviewed

Re: [PATCH 05/18] vhost-vdpa: don't cleanup twice in vhost_vdpa_add()

2021-06-23 Thread Stefano Garzarella
e. Signed-off-by: Jason Wang --- net/vhost-vdpa.c | 11 --- 1 file changed, 11 deletions(-) Reviewed-by: Stefano Garzarella diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 728e63ff54..f5689a7c32 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -82,16 +82,6 @@

Re: [PATCH 06/18] vhost-vdpa: fix leaking of vhost_net in vhost_vdpa_add()

2021-06-23 Thread Stefano Garzarella
21f09c546f 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -111,6 +111,7 @@ static int vhost_vdpa_add(NetClientState *ncs, void *be) err: if (net) { vhost_net_cleanup(net); +g_free(net); } return -1; } -- 2.25.1 Reviewed-by: Stefano Garzarella

Re: [PATCH 07/18] vhost-vdpa: tweak the error label in vhost_vdpa_add()

2021-06-23 Thread Stefano Garzarella
On Mon, Jun 21, 2021 at 12:16:39PM +0800, Jason Wang wrote: Introduce new error label to avoid the unnecessary checking of net pointer. Fixes: 1e0a84ea49b68 ("vhost-vdpa: introduce vhost-vdpa net client") Signed-off-by: Jason Wang --- net/vhost-vdpa.c | 13 ++--- 1 file changed, 6 insert

Re: [PATCH 08/18] vhost-vdpa: fix the wrong assertion in vhost_vdpa_init()

2021-06-23 Thread Stefano Garzarella
_fd = vdpa_device_fd; ret = vhost_vdpa_add(nc, (void *)&s->vhost_vdpa); -assert(s->vhost_net); +if (ret) { +qemu_close(vdpa_device_fd); +qemu_del_net_client(nc); +} Okay, I see now :-) Reviewed-by: Stefano Garzarella return ret; } -- 2.25.1

Re: [PATCH 10/18] vhost-vdpa: open device fd in net_init_vhost_vdpa()

2021-06-23 Thread Stefano Garzarella
deletions(-) Reviewed-by: Stefano Garzarella diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 572aed4ca2..e63a54a938 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -157,24 +157,19 @@ static NetClientInfo net_vhost_vdpa_info = { }; static int net_vhost_vdpa_init(NetClientState *peer

Re: [PATCH 09/18] vhost-vdpa: remove the unncessary queue_index assignment

2021-06-23 Thread Stefano Garzarella
deletion(-) Reviewed-by: Stefano Garzarella diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 87b181a74e..572aed4ca2 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -166,7 +166,6 @@ static int net_vhost_vdpa_init(NetClientState *peer, const char *device, assert(name); nc

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

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 not

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 v6] virtio/vsock: add two more queues for datagram types

2021-09-15 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 m

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 and

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

2021-09-21 Thread Stefano Garzarella
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

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

2021-09-21 Thread Stefano Garzarella
, add 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-v

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

2021-09-21 Thread Stefano Garzarella
ot;vhost-vsock: SOCK_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

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 not

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 receive

[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

[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 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 3/3] linux-aio: add `dev_max_batch` parameter to laio_io_unplug()

2021-09-23 Thread Stefano Garzarella
: 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

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

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

2021-09-01 Thread Stefano Garzarella
@@ static 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: [PATCH 2/3] hw/virtio: Remove NULL check in virtio_free_region_cache()

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

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

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

2021-09-07 Thread Stefano Garzarella
ure bit for machine 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 Ga

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 if

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

2021-09-07 Thread Stefano Garzarella
l() hw/virtio: 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 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. remove

<    5   6   7   8   9   10   11   12   13   14   >