Re: [PATCH v3] vhost: cache avail index in vhost_enable_notify()

2022-02-02 Thread Stefano Garzarella
On Wed, Feb 02, 2022 at 06:24:05AM -0500, Michael S. Tsirkin wrote: On Wed, Feb 02, 2022 at 11:14:30AM +, Stefan Hajnoczi wrote: On Fri, Jan 28, 2022 at 10:41:29AM +0100, Stefano Garzarella wrote: > In vhost_enable_notify() we enable the notifications and we read > the avail index to

[PATCH v3] vhost: cache avail index in vhost_enable_notify()

2022-01-28 Thread Stefano Garzarella
vhost_enable_notify()/vhost_disable_notify() on every cycle when calling vhost_get_vq_desc(); in this case we observed a more evident improvement, with a reduction of the test execution time of about 3.7%. Signed-off-by: Stefano Garzarella --- v3 - reworded commit description [Stefan] --- drivers/vhost

Re: [PATCH v1] vhost: cache avail index in vhost_enable_notify()

2022-01-25 Thread Stefano Garzarella
On Mon, Jan 24, 2022 at 11:31:49AM +, Stefan Hajnoczi wrote: On Fri, Jan 14, 2022 at 10:05:08AM +0100, Stefano Garzarella wrote: In vhost_enable_notify() we enable the notifications and we read the avail index to check if new buffers have become available in the meantime. We

[PATCH v2] vhost: cache avail index in vhost_enable_notify()

2022-01-21 Thread Stefano Garzarella
()/vhost_disable_notify() on every cycle when calling vhost_get_vq_desc(); in this case we observed a more evident improvement, with a reduction of the test execution time of about 3.7%. Signed-off-by: Stefano Garzarella --- v2 - added performance info in the commit description [MST] --- drivers

Re: [PATCH v1] vhost: cache avail index in vhost_enable_notify()

2022-01-20 Thread Stefano Garzarella
On Fri, Jan 14, 2022 at 2:40 PM Michael S. Tsirkin wrote: > > On Fri, Jan 14, 2022 at 02:38:16PM +0100, Stefano Garzarella wrote: > > On Fri, Jan 14, 2022 at 07:45:35AM -0500, Michael S. Tsirkin wrote: > > > On Fri, Jan 14, 2022 at 10:05:08AM +0100, Ste

[PATCH] tools/virtio: fix virtio_test execution

2022-01-18 Thread Stefano Garzarella
virtio_test hangs on __vring_new_virtqueue() because `vqs_list_lock` is not initialized. Let's initialize it in vdev_info_init(). Signed-off-by: Stefano Garzarella --- tools/virtio/virtio_test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/virtio/virtio_test.c b/tools/virtio

Re: [PATCH v1] vhost: cache avail index in vhost_enable_notify()

2022-01-14 Thread Stefano Garzarella
On Fri, Jan 14, 2022 at 07:45:35AM -0500, Michael S. Tsirkin wrote: On Fri, Jan 14, 2022 at 10:05:08AM +0100, Stefano Garzarella wrote: In vhost_enable_notify() we enable the notifications and we read the avail index to check if new buffers have become available in the meantime. We

[PATCH v1] vhost: cache avail index in vhost_enable_notify()

2022-01-14 Thread Stefano Garzarella
because the above path is not very common, indeed vhost_enable_notify() is often called with unlikely(), expecting that avail index has not been updated. Signed-off-by: Stefano Garzarella --- v1: - improved the commit description [MST, Jason] --- drivers/vhost/vhost.c | 3 ++- 1 file changed, 2

Re: [RFC PATCH] vhost: cache avail index in vhost_enable_notify()

2022-01-14 Thread Stefano Garzarella
On Fri, Jan 14, 2022 at 02:18:01PM +0800, Jason Wang wrote: On Thu, Jan 13, 2022 at 10:57 PM Stefano Garzarella wrote: In vhost_enable_notify() we enable the notifications and we read the avail index to check if new buffers have become available in the meantime. In this case, the device would

Re: [RFC PATCH] vhost: cache avail index in vhost_enable_notify()

2022-01-13 Thread Stefano Garzarella
On Thu, Jan 13, 2022 at 10:19:46AM -0500, Michael S. Tsirkin wrote: On Thu, Jan 13, 2022 at 03:56:42PM +0100, Stefano Garzarella wrote: In vhost_enable_notify() we enable the notifications and we read the avail index to check if new buffers have become available in the meantime. In this case

[RFC PATCH] vhost: cache avail index in vhost_enable_notify()

2022-01-13 Thread Stefano Garzarella
` and compare it with `last_avail_idx` to check if there are new buffers available. Signed-off-by: Stefano Garzarella --- drivers/vhost/vhost.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 59edb5a1ffe2..07363dff559e

[PATCH] vhost: remove avail_event arg from vhost_update_avail_event()

2022-01-13 Thread Stefano Garzarella
In vhost_update_avail_event() we never used the `avail_event` argument, since its introduction in commit 2723feaa8ec6 ("vhost: set log when updating used flags or avail event"). Let's remove it to clean up the code. Signed-off-by: Stefano Garzarella --- drivers/vhost/vhost.c | 4 ++

Re: [PATCH bpf-next v2] net: don't include filter.h from net/sock.h

2021-12-29 Thread Stefano Garzarella
build in ip6_fib with randconfig For AF_VSOCK: Acked-by: Stefano Garzarella ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH] vdpa: regist vhost-vdpa dev class

2021-12-23 Thread Stefano Garzarella
On Thu, Dec 23, 2021 at 03:31:45PM +0800, Yi Wang wrote: From: Zhang Min Some applications like kata-containers need to acquire MAJOR/MINOR/DEVNAME for devInfo [1], so regist vhost-vdpa dev class to expose uevent. 1.

Re: [PATCH v2 00/10] Allow for configuring max number of virtqueue pairs

2021-12-14 Thread Stefano Garzarella
On Tue, Dec 14, 2021 at 11:53:03AM +0200, Eli Cohen wrote: On Tue, Dec 14, 2021 at 10:42:35AM +0100, Stefano Garzarella wrote: Hi Eli, I don't know what's wrong, but I've only received replies through the virtualization@lists.linux-foundation.org mailing list. Even in the archive I can't find

Re: [PATCH v2 00/10] Allow for configuring max number of virtqueue pairs

2021-12-14 Thread Stefano Garzarella
Hi Eli, I don't know what's wrong, but I've only received replies through the virtualization@lists.linux-foundation.org mailing list. Even in the archive I can't find your original series. Adding virtualization-ow...@lists.linux-foundation.org to double check what's going wrong. Thanks,

Re: [PATCH] virtio: fix a typo in function "vp_modern_remove" comments.

2021-12-10 Thread Stefano Garzarella
- 2.30.2 Reviewed-by: Stefano Garzarella ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH] ifcvf/vDPA: fix misuse virtio-net device config size for blk dev

2021-11-30 Thread Stefano Garzarella
size. Signed-off-by: Zhu Lingshan Reported-and-suggested-by: Stefano Garzarella Fixes: 6ad31d162a4e ("vDPA/ifcvf: enable Intel C5000X-PL virtio-block for vDPA") Cc: --- drivers/vdpa/ifcvf/ifcvf_base.c | 41 + drivers/vdpa/ifcvf/ifcvf_base.h | 9 +--- dr

[PATCH v2 2/2] vdpa: add driver_override support

2021-11-26 Thread Stefano Garzarella
-devices dev1 vhost_vdpa [*] Note: driverctl(8) integrates with udev so the binding is preserved. Suggested-by: Jason Wang Acked-by: Jason Wang Signed-off-by: Stefano Garzarella --- v2: - added documentation in Documentation/ABI/testing/sysfs-bus-vdpa --- include/linux/vdpa.h

[PATCH v2 1/2] docs: document sysfs ABI for vDPA bus

2021-11-26 Thread Stefano Garzarella
Add missing documentation of sysfs ABI for vDPA bus in the new Documentation/ABI/testing/sysfs-bus-vdpa file. Signed-off-by: Stefano Garzarella --- Documentation/ABI/testing/sysfs-bus-vdpa | 37 MAINTAINERS | 1 + 2 files changed, 38

[PATCH v2 0/2] vdpa: add driver_override support and sysfs ABI documentation

2021-11-26 Thread Stefano Garzarella
in Documentation/ABI/testing/sysfs-bus-vdpa v1: https://lore.kernel.org/virtualization/20211104161729.258294-1-sgarz...@redhat.com/ Thanks, Stefano Stefano Garzarella (2): docs: document sysfs ABI for vDPA bus vdpa: add driver_override support include/linux/vdpa.h | 2

Re: [PATCH v2] virtio/vsock: fix the transport to work with VMADDR_CID_ANY

2021-11-26 Thread Stefano Garzarella
t...@vger.kernel.org) that seems not CCed. Please use ./scripts/get_maintainer.pl next time. Maybe this one can be queued by Michael, let's wait a bit, otherwise please resend CCing netdev and using "net" tag. Anyway the patch LGTM: R

Re: [PATCH] virtio/vsock: fix the transport to work with VMADDR_CID_ANY

2021-11-25 Thread Stefano Garzarella
On Thu, Nov 25, 2021 at 09:27:40AM +, Wang, Wei W wrote: On Thursday, November 25, 2021 3:16 PM, Wang, Wei W wrote: - /* Update CID in case it has changed after a transport reset event */ - vsk->local_addr.svm_cid = dst.svm_cid; - if (space_available)

Re: [PATCH V4 0/3] vDPA/ifcvf: enables Intel C5000X-PL virtio-blk

2021-11-24 Thread Stefano Garzarella
Hi Zhu, On Mon, Apr 19, 2021 at 8:39 AM Zhu Lingshan wrote: > > This series enabled Intel FGPA SmartNIC C5000X-PL virtio-blk for vDPA. Looking at the IFCVF upstream vDPA driver (with this series applied), it seems that there is still some cleaning to be done to support virtio-blk devices: -

Re: [PATCH] vdpa_sim: avoid putting an uninitialized iova_domain

2021-11-23 Thread Stefano Garzarella
this :-) With the Fixes tag as suggested: Reviewed-by: Stefano Garzarella ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

[PATCH 2/2] vhost/vsock: cleanup removing `len` variable

2021-11-22 Thread Stefano Garzarella
We can increment `total_len` directly and remove `len` since it is no longer used for vhost_add_used(). Signed-off-by: Stefano Garzarella --- drivers/vhost/vsock.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c index

[PATCH 1/2] vhost/vsock: fix incorrect used length reported to the guest

2021-11-22 Thread Stefano Garzarella
we must pass 0 as "used length" to comply virtio spec. Fixes: 433fc58e6bf2 ("VSOCK: Introduce vhost_vsock.ko") Cc: sta...@vger.kernel.org Reported-by: Halil Pasic Suggested-by: Jason Wang Signed-off-by: Stefano Garzarella --- drivers/vhost/vsock.c | 2 +- 1 file changed, 1 inser

[PATCH 0/2] vhost/vsock: fix used length and cleanup in vhost_vsock_handle_tx_kick()

2021-11-22 Thread Stefano Garzarella
a bit recently. Thanks, Stefano [1] https://lore.kernel.org/virtualization/20211122105822.onarsa4sydzxqynu@steredhat/T/#t [2] https://lore.kernel.org/virtualization/20211027022107.14357-1-jasow...@redhat.com/T/#t Stefano Garzarella (2): vhost/vsock: fix incorrect used length reported

Re: [PATCH V5 1/4] virtio_ring: validate used buffer length

2021-11-22 Thread Stefano Garzarella
On Mon, Nov 22, 2021 at 03:24:32PM +0100, Halil Pasic wrote: On Mon, 22 Nov 2021 12:08:22 +0100 Stefano Garzarella wrote: On Mon, Nov 22, 2021 at 08:55:24AM +0100, Stefano Garzarella wrote: >On Mon, Nov 22, 2021 at 02:25:26PM +0800, Jason Wang wrote: >>On Mon, Nov 22, 2021 at 1:49

Re: [PATCH V5 1/4] virtio_ring: validate used buffer length

2021-11-22 Thread Stefano Garzarella
On Mon, Nov 22, 2021 at 08:55:24AM +0100, Stefano Garzarella wrote: On Mon, Nov 22, 2021 at 02:25:26PM +0800, Jason Wang wrote: On Mon, Nov 22, 2021 at 1:49 PM Halil Pasic wrote: On Mon, 22 Nov 2021 06:35:18 +0100 Halil Pasic wrote: > I think it should be a common issue, look

Re: [PATCH] vsock/virtio: suppress used length validation

2021-11-22 Thread Stefano Garzarella
uffer length") Cc: "Jason Wang" Signed-off-by: Michael S. Tsirkin --- net/vmw_vsock/virtio_transport.c | 1 + 1 file changed, 1 insertion(+) Thanks for this fix Reviewed-by: Stefano Garzarella I think we should also fix vhost-vsock violation (in stable branches too). @Halil

Re: [PATCH V5 1/4] virtio_ring: validate used buffer length

2021-11-21 Thread Stefano Garzarella
On Mon, Nov 22, 2021 at 02:25:26PM +0800, Jason Wang wrote: On Mon, Nov 22, 2021 at 1:49 PM Halil Pasic wrote: On Mon, 22 Nov 2021 06:35:18 +0100 Halil Pasic wrote: > > I think it should be a common issue, looking at > > vhost_vsock_handle_tx_kick(), it did: > > > > len += sizeof(pkt->hdr);

Re: [PATCH V5 1/4] virtio_ring: validate used buffer length

2021-11-21 Thread Stefano Garzarella
On Mon, Nov 22, 2021 at 11:51:09AM +0800, Jason Wang wrote: On Fri, Nov 19, 2021 at 11:10 PM Halil Pasic wrote: On Wed, 27 Oct 2021 10:21:04 +0800 Jason Wang wrote: > This patch validate the used buffer length provided by the device > before trying to use it. This is done by record the in

Re: [PATCH] virtio-blk: modify the value type of num in virtio_queue_rq()

2021-11-17 Thread Stefano Garzarella
+ int num; int qid = hctx->queue_num; bool notify = false; blk_status_t status; -- 2.25.1 The patch LGTM. With the Fixes tag added: Reviewed-by: Stefano Garzarella ___ Virtualization mailing list Virtualization@lists.linux-f

Re: [PATCH 1/6] vhost: get rid of vhost_poll_flush() wrapper

2021-11-16 Thread Stefano Garzarella
On Mon, Nov 15, 2021 at 06:29:58PM +0300, Andrey Ryabinin wrote: vhost_poll_flush() is a simple wrapper around vhost_work_dev_flush(). It gives wrong impression that we are doing some work over vhost_poll, while in fact it flushes vhost_poll->dev. It only complicate understanding of the code and

Re: [PATCH 4/6] vhost_vsock: simplify vhost_vsock_flush()

2021-11-16 Thread Stefano Garzarella
_work_dev_flush(vsock->vqs[i].poll.dev); vhost_work_dev_flush(>dev); } -- 2.32.0 Reviewed-by: Stefano Garzarella ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH 2/6] vhost_net: get rid of vhost_net_flush_vq() and extra flush calls

2021-11-16 Thread Stefano Garzarella
On Mon, Nov 15, 2021 at 06:29:59PM +0300, Andrey Ryabinin wrote: vhost_net_flush_vq() calls vhost_work_dev_flush() twice passing vhost_dev pointer obtained via 'n->poll[index].dev' and 'n->vqs[index].vq.poll.dev'. This is actually the same pointer, initialized in

Re: [PATCH 1/6] vhost: get rid of vhost_poll_flush() wrapper

2021-11-16 Thread Stefano Garzarella
On Mon, Nov 15, 2021 at 06:29:58PM +0300, Andrey Ryabinin wrote: vhost_poll_flush() is a simple wrapper around vhost_work_dev_flush(). It gives wrong impression that we are doing some work over vhost_poll, while in fact it flushes vhost_poll->dev. It only complicate understanding of the code and

Re: [RFC] hypercall-vsock: add a new vsock transport

2021-11-10 Thread Stefano Garzarella
On Wed, Nov 10, 2021 at 07:12:36AM +, Wang, Wei W wrote: Hi, We plan to add a new vsock transport based on hypercall (e.g. vmcall on Intel CPUs). It transports AF_VSOCK packets between the guest and host, which is similar to virtio-vsock, vmci-vsock and hyperv-vsock. Compared to the above

Re: [PATCH] vdpa: add driver_override support

2021-11-09 Thread Stefano Garzarella
On Tue, Nov 09, 2021 at 08:10:58AM -0500, Michael S. Tsirkin wrote: On Mon, Nov 08, 2021 at 06:05:29PM +0100, Stefano Garzarella wrote: On Fri, Nov 5, 2021 at 4:01 AM Jason Wang wrote: > > On Fri, Nov 5, 2021 at 12:17 AM Stefano Garzarella wrote: > > > > `driver_override`

Re: [PATCH] vdpa: add driver_override support

2021-11-08 Thread Stefano Garzarella
On Fri, Nov 5, 2021 at 4:01 AM Jason Wang wrote: > > On Fri, Nov 5, 2021 at 12:17 AM Stefano Garzarella > wrote: > > > > `driver_override` allows to control which of the vDPA bus drivers > > binds to a vDPA device. > > > > If `driver_override` is not

Re: [PATCH net] vsock: prevent unnecessary refcnt inc for nonblocking connect

2021-11-08 Thread Stefano Garzarella
in the commit message: Fixes: d021c344051a ("VSOCK: Introduce VM Sockets") With that: Reviewed-by: Stefano Garzarella Thanks, Stefano ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.o

Re: [PATCH] vdpa: Avoid duplicate call to vp_vdpa get_status

2021-11-05 Thread Stefano Garzarella
IO_CONFIG_S_DRIVER_OK) && !(status & VIRTIO_CONFIG_S_DRIVER_OK)) for (i = 0; i < nvqs; i++) vhost_vdpa_unsetup_vq_irq(v, i); -- 2.27.0 Reviewed-by: Stefano Garzarella ___ Virtualization mailing lis

Re: [PATCH] vdpa: Mark vdpa_config_ops.get_vq_notification as optional

2021-11-05 Thread Stefano Garzarella
* Returns the notifcation area -- 2.27.0 Reviewed-by: Stefano Garzarella ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH] vdpa: add driver_override support

2021-11-05 Thread Stefano Garzarella
On Fri, Nov 05, 2021 at 04:26:44PM +0800, Jason Wang wrote: On Fri, Nov 5, 2021 at 4:05 PM Stefano Garzarella wrote: On Fri, Nov 05, 2021 at 11:01:30AM +0800, Jason Wang wrote: >On Fri, Nov 5, 2021 at 12:17 AM Stefano Garzarella wrote: >> >> `driver_override` allows t

Re: [PATCH] vdpa: add driver_override support

2021-11-05 Thread Stefano Garzarella
On Fri, Nov 05, 2021 at 11:01:30AM +0800, Jason Wang wrote: On Fri, Nov 5, 2021 at 12:17 AM Stefano Garzarella wrote: `driver_override` allows to control which of the vDPA bus drivers binds to a vDPA device. If `driver_override` is not set, the previous behaviour is followed: devices use

[PATCH] vdpa: add driver_override support

2021-11-04 Thread Stefano Garzarella
-devices dev1 vhost_vdpa [*] Note: driverctl(8) integrates with udev so the binding is preserved. Suggested-by: Jason Wang Signed-off-by: Stefano Garzarella --- include/linux/vdpa.h | 2 ++ drivers/vdpa/vdpa.c | 74 2 files changed, 76

Re: vDPA bus driver selection

2021-10-29 Thread Stefano Garzarella
On Fri, Oct 29, 2021 at 10:34:00AM +0800, Jason Wang wrote: On Thu, Oct 28, 2021 at 5:48 PM Parav Pandit wrote: > From: Stefano Garzarella > Sent: Thursday, October 28, 2021 3:08 PM > >> >$ vdpa/vdpa dev add mgmtdev vdpasim_net name vdpa0 mac > >> >00:11:2

Re: vDPA bus driver selection

2021-10-29 Thread Stefano Garzarella
On Fri, Oct 29, 2021 at 10:31:22AM +0800, Jason Wang wrote: On Thu, Oct 28, 2021 at 5:47 PM Stefano Garzarella wrote: On Thu, Oct 28, 2021 at 10:24:47AM +0800, Jason Wang wrote: >On Thu, Oct 28, 2021 at 4:16 AM Michael S. Tsirkin wrote: >> >> On Wed, Oct 27, 2021 at 03:21:15

Re: vDPA bus driver selection

2021-10-28 Thread Stefano Garzarella
On Thu, Oct 28, 2021 at 10:24:47AM +0800, Jason Wang wrote: On Thu, Oct 28, 2021 at 4:16 AM Michael S. Tsirkin wrote: On Wed, Oct 27, 2021 at 03:21:15PM +, Parav Pandit wrote: > Hi Stefano, > > > From: Stefano Garzarella > > Sent: Wednesday, October 27, 2021 8:04 P

Re: vDPA bus driver selection

2021-10-28 Thread Stefano Garzarella
On Wed, Oct 27, 2021 at 03:56:16PM +, Parav Pandit wrote: Hi Stefano, From: Stefano Garzarella Sent: Wednesday, October 27, 2021 9:17 PM To: Parav Pandit Cc: Jason Wang ; Michael Tsirkin ; Linux Virtualization ; Eli Cohen Subject: Re: vDPA bus driver selection Hi Parav, On Wed, Oct 27

Re: vDPA bus driver selection

2021-10-28 Thread Stefano Garzarella
On Wed, Oct 27, 2021 at 02:45:15PM -0400, Michael S. Tsirkin wrote: On Wed, Oct 27, 2021 at 04:33:50PM +0200, Stefano Garzarella wrote: Hi folks, I was trying to understand if we have a way to specify which vDPA bus driver (e.g. vhost-vdpa, virtio-vdpa) a device should use. IIUC we don't have

Re: vDPA bus driver selection

2021-10-27 Thread Stefano Garzarella
Hi Parav, On Wed, Oct 27, 2021 at 03:21:15PM +, Parav Pandit wrote: Hi Stefano, From: Stefano Garzarella Sent: Wednesday, October 27, 2021 8:04 PM Hi folks, I was trying to understand if we have a way to specify which vDPA bus driver (e.g. vhost-vdpa, virtio-vdpa) a device should use

vDPA bus driver selection

2021-10-27 Thread Stefano Garzarella
Hi folks, I was trying to understand if we have a way to specify which vDPA bus driver (e.g. vhost-vdpa, virtio-vdpa) a device should use. IIUC we don't have it, and the first registered driver is used when a new device is registered. I was thinking if it makes sense to extend the management API

Re: [PATCH linux-next v7 4/8] vdpa: Enable user to set mac and mtu of vdpa device

2021-10-27 Thread Stefano Garzarella
c | 38 ++-- drivers/vdpa/vdpa_sim/vdpa_sim_blk.c | 3 ++- drivers/vdpa/vdpa_sim/vdpa_sim_net.c | 3 ++- drivers/vdpa/vdpa_user/vduse_dev.c | 3 ++- include/linux/vdpa.h | 17

Re: [PATCH linux-next v6 4/8] vdpa: Enable user to set mac and mtu of vdpa device

2021-10-26 Thread Stefano Garzarella
On Tue, Oct 26, 2021 at 01:11:51PM +, Parav Pandit wrote: From: Michael S. Tsirkin Sent: Tuesday, October 26, 2021 6:38 PM On Tue, Oct 26, 2021 at 01:03:41PM +, Parav Pandit wrote: > > > > From: Stefano Garzarella > > Sent: Tuesday, October 26, 2021 6:31 PM >

Re: [PATCH linux-next v6 5/8] vdpa_sim_net: Enable user to set mac address and mtu

2021-10-26 Thread Stefano Garzarella
-by: Parav Pandit Reviewed-by: Eli Cohen --- changelog: v4->v5: - updated commit log example for add command --- drivers/vdpa/vdpa_sim/vdpa_sim_net.c | 35 +++- 1 file changed, 19 insertions(+), 16 deletions(-) Reviewed-by: Stefano Garzare

Re: [PATCH linux-next v6 4/8] vdpa: Enable user to set mac and mtu of vdpa device

2021-10-26 Thread Stefano Garzarella
On Tue, Oct 26, 2021 at 07:02:39AM +0300, Parav Pandit via Virtualization wrote: $ vdpa dev add name bar mgmtdev vdpasim_net mac 00:11:22:33:44:55 mtu 9000 $ vdpa dev config show bar: mac 00:11:22:33:44:55 link up link_announce false mtu 9000 $ vdpa dev config show -jp { "config": {

Re: [PATCH linux-next v6 3/8] vdpa: Use kernel coding style for structure comments

2021-10-26 Thread Stefano Garzarella
/vdpa.h | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) Reviewed-by: Stefano Garzarella ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH linux-next v6 1/8] vdpa: Introduce and use vdpa device get, set config helpers

2021-10-26 Thread Stefano Garzarella
ons(-) Reviewed-by: Stefano Garzarella ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH] eni_vdpa: alibaba: fix Kconfig typo

2021-10-26 Thread Stefano Garzarella
) in archive drivers/built-in.a Fixes: 52e437b2b222 ("eni_vdpa: add vDPA driver for Alibaba ENI") Signed-off-by: Arnd Bergmann --- drivers/vdpa/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefano

Re: [PATCH V3 06/11] vhost-sock: convert to vq helpers

2021-10-25 Thread Stefano Garzarella
On Fri, Oct 22, 2021 at 12:19:06AM -0500, Mike Christie wrote: Convert from vhost dev based helpers to vq ones. Signed-off-by: Mike Christie --- drivers/vhost/vsock.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c index

Re: [PATCH] virtio-blk: fixup coccinelle warnings

2021-10-21 Thread Stefano Garzarella
-by: Ye Guojin --- drivers/block/virtio_blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefano Garzarella ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman

Re: [PATCH V3 01/10] virtio-blk: validate num_queues during probe

2021-10-20 Thread Stefano Garzarella
On Wed, Oct 20, 2021 at 03:37:31AM -0400, Michael S. Tsirkin wrote: On Wed, Oct 20, 2021 at 09:18:17AM +0200, Stefano Garzarella wrote: On Tue, Oct 19, 2021 at 03:01:43PM +0800, Jason Wang wrote: > If an untrusted device neogitates BLK_F_MQ but advertises a zero s/neogitates/negotia

Re: [PATCH V3 01/10] virtio-blk: validate num_queues during probe

2021-10-20 Thread Stefano Garzarella
the NULL. This will lead unexpected results. Fixing this by failing the probe in this case. Cc: Paolo Bonzini Cc: Stefan Hajnoczi Cc: Stefano Garzarella Signed-off-by: Jason Wang --- drivers/block/virtio_blk.c | 4 1 file changed, 4 insertions(+) Should we CC stable? Reviewed-by: Stefano

Re: [PATCH RFC] virtio: wrap config->reset calls

2021-10-18 Thread Stefano Garzarella
s_virtio.c | 2 +- net/vmw_vsock/virtio_transport.c | 4 ++-- Reviewed-by: Stefano Garzarella ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

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 ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https

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 ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

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 ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

[PATCH net] vsock_diag_test: remove free_sock_stat() call in test_no_sockets

2021-10-14 Thread Stefano Garzarella
() can be reached also when the list is not empty. Reported-by: Marc-André Lureau Signed-off-by: Stefano Garzarella --- tools/testing/vsock/vsock_diag_test.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/testing/vsock/vsock_diag_test.c b/tools/testing/vsock/vsock_diag_test.c

Re: [bug report] vdpa_sim_blk: implement ramdisk behaviour

2021-09-29 Thread Stefano Garzarella
On Wed, Sep 29, 2021 at 02:46:52PM +0300, Dan Carpenter wrote: On Wed, Sep 29, 2021 at 02:37:42PM +0300, Dan Carpenter wrote: 89 /* The last byte is the status and we checked if the last iov has 90 * enough room for it. 91 */ 92 to_push =

Re: [PATCH 1/9] virtio-blk: validate num_queues during probe

2021-09-13 Thread Stefano Garzarella
On Mon, Sep 13, 2021 at 01:53:45PM +0800, Jason Wang wrote: If an untrusted device neogitates BLK_F_MQ but advertises a zero num_queues, the driver may end up trying to allocating zero size buffers where ZERO_SIZE_PTR is returned which may pass the checking against the NULL. This will lead

Re: [PATCH] vdpa: potential uninitialized return in vhost_vdpa_va_map()

2021-09-07 Thread Stefano Garzarella
_ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization Reviewed-by: Stefano Garzarella ___ Virtualization mailing list Virtualization@lists.linux-foundation.org

Re: [PATCH] MAINTAINERS: add VM SOCKETS (AF_VSOCK) entry

2021-09-07 Thread Stefano Garzarella
On Mon, Sep 06, 2021 at 07:10:46PM +, Dexuan Cui wrote: From: Stefano Garzarella Sent: Monday, September 6, 2021 2:12 AM Add a new entry for VM Sockets (AF_VSOCK) that covers vsock core, tests, and headers. Move some general vsock stuff from virtio-vsock entry into this new more general

Re: [PATCH] MAINTAINERS: add VM SOCKETS (AF_VSOCK) entry

2021-09-07 Thread Stefano Garzarella
On Mon, Sep 06, 2021 at 02:50:59PM +, Jorgen Hansen wrote: On 6 Sep 2021, at 11:11, Stefano Garzarella wrote: Add a new entry for VM Sockets (AF_VSOCK) that covers vsock core, tests, and headers. Move some general vsock stuff from virtio-vsock entry into this new more general vsock

Re: [PATCH] MAINTAINERS: add VM SOCKETS (AF_VSOCK) entry

2021-09-07 Thread Stefano Garzarella
On Mon, Sep 06, 2021 at 02:24:34PM +0100, Stefan Hajnoczi wrote: On Mon, Sep 06, 2021 at 11:11:59AM +0200, Stefano Garzarella wrote: Add a new entry for VM Sockets (AF_VSOCK) that covers vsock core, tests, and headers. Move some general vsock stuff from virtio-vsock entry into this new more

[PATCH] MAINTAINERS: add VM SOCKETS (AF_VSOCK) entry

2021-09-06 Thread Stefano Garzarella
Cui Cc: Jorgen Hansen Cc: Stefan Hajnoczi Suggested-by: Michael S. Tsirkin Signed-off-by: Stefano Garzarella --- Dexuan, Jorgen, Stefan, would you like to co-maintain or be added as a reviewer? Thanks, Stefano --- MAINTAINERS | 20 +--- 1 file changed, 13 insertions(+), 7

Re: [PATCH net-next v5 0/6] virtio/vsock: introduce MSG_EOR flag for SEQPACKET

2021-09-06 Thread Stefano Garzarella
ed from userspace. >>>>This patchset includes simple test for MSG_EOR. >>> I'm prepared to merge this for this window, >>> but I'm not sure who's supposed to ack the net/vmw_vsock/af_vsock.c >>> bits. It's a harmless variable renaming so maybe it does n

Re: [PATCH net-next v5 3/6] vhost/vsock: support MSG_EOR bit processing

2021-09-03 Thread Stefano Garzarella
queueing the same virtio_vsock_pkt to handle * the remaining bytes, and we want to deliver it -- 2.25.1 Reviewed-by: Stefano Garzarella ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH net-next v4 3/6] vhost/vsock: support MSG_EOR bit processing

2021-09-03 Thread Stefano Garzarella
On Fri, Sep 03, 2021 at 08:55:39AM +0200, Stefano Garzarella wrote: On Fri, Sep 03, 2021 at 09:15:38AM +0300, Arseny Krasnov wrote: 'MSG_EOR' handling has similar logic as 'MSG_EOM' - if bit present in packet's header, reset it to 0. Then restore it back if packet processing wasn't completed

Re: [virtio-comment] Re: [PATCH v5] virtio-vsock: add description for datagram type

2021-09-03 Thread Stefano Garzarella
On Fri, Sep 03, 2021 at 03:57:24AM -0400, Michael S. Tsirkin wrote: On Fri, Sep 03, 2021 at 09:22:24AM +0200, Stefano Garzarella wrote: On Thu, Sep 02, 2021 at 05:08:01PM -0700, Jiang Wang . wrote: > On Thu, Sep 2, 2021 at 7:07 AM Stefan Hajnoczi wrote: > > On Thu, Jun 10, 2021 at 0

Re: [virtio-comment] Re: [PATCH v5] virtio-vsock: add description for datagram type

2021-09-03 Thread Stefano Garzarella
On Thu, Sep 02, 2021 at 05:08:01PM -0700, Jiang Wang . wrote: On Thu, Sep 2, 2021 at 7:07 AM Stefan Hajnoczi wrote: On Thu, Jun 10, 2021 at 06:12:03PM +, Jiang Wang wrote: > Add supports for datagram type for virtio-vsock. Datagram > sockets are connectionless and unreliable. To avoid

Re: [PATCH net-next v4 3/6] vhost/vsock: support MSG_EOR bit processing

2021-09-03 Thread Stefano Garzarella
are queueing the same virtio_vsock_pkt to handle * the remaining bytes, and we want to deliver it -- 2.25.1 Reviewed-by: Stefano Garzarella ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH v11 05/12] vhost-vdpa: Handle the failure of vdpa_reset()

2021-08-24 Thread Stefano Garzarella
On Wed, Aug 18, 2021 at 08:06:35PM +0800, Xie Yongji wrote: The vdpa_reset() may fail now. This adds check to its return value and fail the vhost_vdpa_open(). Signed-off-by: Xie Yongji --- drivers/vhost/vdpa.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) Reviewed-by: Stefano

Re: [PATCH v11 03/12] vdpa: Fix some coding style issues

2021-08-24 Thread Stefano Garzarella
, Signed-off-by: Xie Yongji --- include/linux/vdpa.h | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) Reviewed-by: Stefano Garzarella diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h index 954b340f6c2f..8a645f8f4476 100644 --- a/include/linux

Re: [RFC PATCH v3 0/6] virtio/vsock: introduce MSG_EOR flag for SEQPACKET

2021-08-24 Thread Stefano Garzarella
On Tue, Aug 24, 2021 at 01:18:06PM +0300, Arseny Krasnov wrote: On 24.08.2021 13:05, Stefano Garzarella wrote: Caution: This is an external email. Be cautious while opening links or attachments. Hi Arseny, On Mon, Aug 23, 2021 at 09:41:16PM +0300, Arseny Krasnov wrote: Hello, please ping

Re: [RFC PATCH v3 0/6] virtio/vsock: introduce MSG_EOR flag for SEQPACKET

2021-08-24 Thread Stefano Garzarella
Hi Arseny, On Mon, Aug 23, 2021 at 09:41:16PM +0300, Arseny Krasnov wrote: Hello, please ping :) Sorry, I was off last week. I left some minor comments in the patches. Let's wait a bit for other comments before next version, also on the spec, then I think you can send the next version

Re: [RFC PATCH v3 3/6] vhost/vsock: support MSG_EOR bit processing

2021-08-24 Thread Stefano Garzarella
On Mon, Aug 16, 2021 at 11:51:40AM +0300, Arseny Krasnov wrote: 'MSG_EOR' handling has same logic as 'MSG_EOM' - if bit present s/same/similar in packet's header, reset it to 0. Then restore it back if packet processing wasn't completed. Instead of bool variable for each flag, bit mask

Re: [RFC PATCH v3 2/6] virtio/vsock: add 'VIRTIO_VSOCK_SEQ_EOR' bit.

2021-08-24 Thread Stefano Garzarella
+98,7 @@ enum virtio_vsock_shutdown { /* VIRTIO_VSOCK_OP_RW flags values */ enum virtio_vsock_rw { VIRTIO_VSOCK_SEQ_EOM = 1, + VIRTIO_VSOCK_SEQ_EOR = 2, }; #endif /* _UAPI_LINUX_VIRTIO_VSOCK_H */ -- 2.25.1 Reviewed-by: Stefano Garzarella

Re: [RFC PATCH v3 1/6] virtio/vsock: rename 'EOR' to 'EOM' bit.

2021-08-24 Thread Stefano Garzarella
--- drivers/vhost/vsock.c | 12 ++-- include/uapi/linux/virtio_vsock.h | 2 +- net/vmw_vsock/virtio_transport_common.c | 14 +++--- 3 files changed, 14 insertions(+), 14 deletions(-) Reviewed-by: Stefano Garzarella

Re: [RFC PATCH v8 2/2] virtio-vsock: SOCK_SEQPACKET description

2021-08-24 Thread Stefano Garzarella
On Mon, Aug 16, 2021 at 11:56:13AM +0300, Arseny Krasnov wrote: This adds description of SOCK_SEQPACKET socket type support for virtio-vsock. Signed-off-by: Arseny Krasnov --- virtio-vsock.tex | 43 ++- 1 file changed, 38 insertions(+), 5 deletions(-)

Re: [PATCH resend] vsock/virtio: avoid potential deadlock when vsock device remove

2021-08-12 Thread Stefano Garzarella
ry. Cc: Stefan Hajnoczi Cc: Stefano Garzarella Cc: "David S. Miller" Cc: Jakub Kicinski We should add: Fixes: 0ea9e1d3a9e3 ("VSOCK: Introduce virtio_transport.ko") Signed-off-by: Longpeng(Mike) --- net/vmw_vsock/virtio_transport.c | 7 +-- 1 file changed, 5 inser

Re: [virtio-comment] [RFC PATCH v7 2/2] virtio-vsock: SOCK_SEQPACKET description

2021-08-11 Thread Stefano Garzarella
On Tue, Aug 10, 2021 at 02:47:06PM +0300, Arseny Krasnov wrote: This adds description of SOCK_SEQPACKET socket type support for virtio-vsock. Signed-off-by: Arseny Krasnov --- virtio-vsock.tex | 35 ++- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git

Re: [virtio-comment] [RFC PATCH v7 1/2] virtio-vsock: use C style defines for constants

2021-08-11 Thread Stefano Garzarella
f-by: Arseny Krasnov --- virtio-vsock.tex | 54 +--- 1 file changed, 28 insertions(+), 26 deletions(-) Reviewed-by: Stefano Garzarella ___ Virtualization mailing list Virtualization@lists.linux-

Re: [RFC PATCH v2 5/5] vsock_test: update message bounds test for MSG_EOR

2021-08-11 Thread Stefano Garzarella
exit(EXIT_FAILURE); + } } close(fd); -- 2.25.1 Reviewed-by: Stefano Garzarella ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [RFC PATCH v2 4/5] af_vsock: rename variables in receive loop

2021-08-11 Thread Stefano Garzarella
g->msg_flags |= MSG_TRUNC; } -- 2.25.1 Reviewed-by: Stefano Garzarella ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [RFC PATCH v2 3/5] virito/vsock: support MSG_EOR bit processing

2021-08-11 Thread Stefano Garzarella
msg->msg_flags |= MSG_EOR; } virtio_transport_dec_rx_pkt(vvs, pkt); -- 2.25.1 Reviewed-by: Stefano Garzarella ___ Virtualization mailing list Virtualization@lists.linux-foundation.o

Re: [RFC PATCH v2 2/5] vhost/vsock: support MSG_EOR bit processing

2021-08-11 Thread Stefano Garzarella
On Tue, Aug 10, 2021 at 02:40:15PM +0300, Arseny Krasnov wrote: It works in the same way as 'end-of-message' bit: if packet has 'EOM' bit, also check for 'EOR' bit. Please describe all changes, e.g. the new variable to accumulate flags to restore. Signed-off-by: Arseny Krasnov ---

Re: [RFC PATCH v2 1/5] virtio/vsock: add 'VIRTIO_VSOCK_SEQ_EOM' bit

2021-08-11 Thread Stefano Garzarella
On Tue, Aug 10, 2021 at 02:39:53PM +0300, Arseny Krasnov wrote: The title is confusing, we are renaming EOR in EOM. This bit is used to mark end of messages('EOM' - end of message), while 'VIRIO_VSOCK_SEQ_EOR' is used to pass MSG_EOR. Also rename 'record' to 'message' in implementation as it

Re: [PATCH] vdpa_sim: Fix incorrect size passed to alloc_iova()

2021-08-09 Thread Stefano Garzarella
that it's better to use iova_shift(): Reviewed-by: Stefano Garzarella Thanks, Stefano ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

<    3   4   5   6   7   8   9   10   11   12   >