Re: [PATCH] vhost-user: fix the issue of vhost deadlock in nested virtualization

2024-02-21 Thread Maxime Coquelin
On 2/20/24 12:43, Michael S. Tsirkin wrote: On Tue, Feb 20, 2024 at 12:26:49PM +0100, Maxime Coquelin wrote: On 2/13/24 11:05, Michael S. Tsirkin wrote: On Fri, Jan 26, 2024 at 06:07:37PM +0800, Hao Chen wrote: I run "dpdk-vdpa" and "qemur-L2" in "qemu-L1"

Re: [PATCH] vhost-user: fix the issue of vhost deadlock in nested virtualization

2024-02-20 Thread Maxime Coquelin
On 2/13/24 11:05, Michael S. Tsirkin wrote: On Fri, Jan 26, 2024 at 06:07:37PM +0800, Hao Chen wrote: I run "dpdk-vdpa" and "qemur-L2" in "qemu-L1". In a nested virtualization environment, "qemu-L2" vhost-user socket sends a "VHOST_USER_IOTLB_MSG" message to "dpdk-vdpa" and blocks waiting

Re: [PATCH v2] vhost-user: send SET_STATUS 0 after GET_VRING_BASE

2023-05-03 Thread Maxime Coquelin
-2716,4 +2729,5 @@ const VhostOps user_ops = { .vhost_get_inflight_fd = vhost_user_get_inflight_fd, .vhost_set_inflight_fd = vhost_user_set_inflight_fd, .vhost_dev_start = vhost_user_dev_start, +.vhost_reset_status = vhost_user_reset_status, }; I confirm it won't introduce reg

Re: [PATCH 1/4] vhost: Re-enable vrings after setting features

2023-04-13 Thread Maxime Coquelin
On 4/12/23 22:51, Stefan Hajnoczi wrote: On Tue, Apr 11, 2023 at 05:05:12PM +0200, Hanna Czenczek wrote: If the back-end supports the VHOST_USER_F_PROTOCOL_FEATURES feature, setting the vhost features will set this feature, too. Doing so disables all vrings, which may not be intended. For

Re: Emulating device configuration / max_virtqueue_pairs in vhost-vdpa and vhost-user

2023-03-10 Thread Maxime Coquelin
On 3/8/23 13:15, Michael S. Tsirkin wrote: On Wed, Mar 08, 2023 at 11:33:45AM +0100, Maxime Coquelin wrote: Hello Michael, On 2/1/23 12:20, Michael S. Tsirkin wrote: On Wed, Feb 01, 2023 at 12:14:18PM +0100, Maxime Coquelin wrote: Thanks Eugenio for working on this. On 1/31/23 20:10

Re: Emulating device configuration / max_virtqueue_pairs in vhost-vdpa and vhost-user

2023-03-08 Thread Maxime Coquelin
Hello Michael, On 2/1/23 12:20, Michael S. Tsirkin wrote: On Wed, Feb 01, 2023 at 12:14:18PM +0100, Maxime Coquelin wrote: Thanks Eugenio for working on this. On 1/31/23 20:10, Eugenio Perez Martin wrote: Hi, The current approach of offering an emulated CVQ to the guest and map the commands

Re: Emulating device configuration / max_virtqueue_pairs in vhost-vdpa and vhost-user

2023-03-02 Thread Maxime Coquelin
On 2/1/23 12:19, Eugenio Perez Martin wrote: On Wed, Feb 1, 2023 at 12:14 PM Maxime Coquelin wrote: Thanks Eugenio for working on this. On 1/31/23 20:10, Eugenio Perez Martin wrote: Hi, The current approach of offering an emulated CVQ to the guest and map the commands to vhost-user

[PATCH v2 3/3] vhost-user: Adopt new backend naming

2023-02-08 Thread Maxime Coquelin
The Vhost-user specification changed feature and request naming from _SLAVE_ to _BACKEND_. This patch adopts the new naming convention. Signed-off-by: Maxime Coquelin --- hw/virtio/vhost-user.c | 30 +++--- hw/virtio/virtio-qmp.c | 12 ++-- 2 files changed, 21

[PATCH v2 2/3] libvhost-user: Adopt new backend naming

2023-02-08 Thread Maxime Coquelin
The Vhost-user specification changed feature and request naming from _SLAVE_ to _BACKEND_. This patch adopts the new naming convention. Signed-off-by: Maxime Coquelin --- subprojects/libvhost-user/libvhost-user.c | 20 ++-- subprojects/libvhost-user/libvhost-user.h | 20

[PATCH v2 0/3] Vhost-user: replace _SLAVE_ with _BACKEND_

2023-02-08 Thread Maxime Coquelin
and make use of the new names in both libvhost-user and the Vhost-user frontend code. Changes in v2: == - Use positive wording (Michael) - Fix grammar mistakes (Michael) Maxime Coquelin (3): docs: vhost-user: replace _SLAVE_ with _BACKEND_ libvhost-user: Adopt new backend naming

[PATCH v2 1/3] docs: vhost-user: replace _SLAVE_ with _BACKEND_

2023-02-08 Thread Maxime Coquelin
Backend's message and protocol features names were still using "_SLAVE_" naming. For consistency with the new naming convention, replace it with _BACKEND_. Signed-off-by: Maxime Coquelin --- docs/interop/vhost-user.rst | 40 ++--- 1 file changed, 20

Re: Emulating device configuration / max_virtqueue_pairs in vhost-vdpa and vhost-user

2023-02-01 Thread Maxime Coquelin
Thanks Eugenio for working on this. On 1/31/23 20:10, Eugenio Perez Martin wrote: Hi, The current approach of offering an emulated CVQ to the guest and map the commands to vhost-user is not scaling well: * Some devices already offer it, so the transformation is redundant. * There is no support

Re: [PATCH 0/3] Vhost-user: replace _SLAVE_ with _BACKEND_

2023-01-30 Thread Maxime Coquelin
On 1/30/23 12:08, Michael S. Tsirkin wrote: On Mon, Jan 30, 2023 at 11:45:45AM +0100, Maxime Coquelin wrote: This series continues the work done to get rid of harmful language in the Vhost-user specification. I prefer a positive "switch to a more inclusive terminology". To consi

[PATCH 3/3] vhost-user: Adopt new backend naming

2023-01-30 Thread Maxime Coquelin
In order to get rid of harmful language, the Vhost-user specification changed features and requests naming from _SLAVE_ to _BACKEND_. This patch adopts the new naming convention. Signed-off-by: Maxime Coquelin --- hw/virtio/vhost-user.c | 30 +++--- hw/virtio/virtio

[PATCH 1/3] docs: vhost-user: replace _SLAVE_ with _BACKEND_

2023-01-30 Thread Maxime Coquelin
Backend's message and protocol features names were still using "_SLAVE_" naming. For consistency with the new naming convention and to get rid of the remaining harmful language, replace it with _BACKEND_. Signed-off-by: Maxime Coquelin --- docs/interop/vhost-use

[PATCH 2/3] libvhost-user: Adopt new backend naming

2023-01-30 Thread Maxime Coquelin
In order to get rid of harmful language, the Vhost-user specification changed features and requests naming from _SLAVE_ to _BACKEND_. This patch adopts the new naming convention. Signed-off-by: Maxime Coquelin --- subprojects/libvhost-user/libvhost-user.c | 20 ++-- subprojects

[PATCH 0/3] Vhost-user: replace _SLAVE_ with _BACKEND_

2023-01-30 Thread Maxime Coquelin
of the new names in both libvhost-user and the Vhost-user frontend code. Maxime Coquelin (3): docs: vhost-user: replace _SLAVE_ with _BACKEND_ libvhost-user: Adopt new backend naming vhost-user: Adopt new backend naming docs/interop/vhost-user.rst | 40

Re: [PATCH 2/2] Revert "vhost-user: Introduce nested event loop in vhost_user_read()"

2023-01-20 Thread Maxime Coquelin
values because of 025faa872bcf ("vhost-user: stick to -errno error return convention"). Signed-off-by: Greg Kurz --- hw/virtio/vhost-user.c | 65 -- 1 file changed, 5 insertions(+), 60 deletions(-) Acked-by: Maxime Coquelin Thanks, Maxime

Re: [PATCH 1/2] Revert "vhost-user: Monitor slave channel in vhost_user_read()"

2023-01-20 Thread Maxime Coquelin
--- hw/virtio/vhost-user.c | 35 +++ 1 file changed, 3 insertions(+), 32 deletions(-) Acked-by: Maxime Coquelin Thanks, Maxime

Re: [RFC v2 06/13] vhost: delay set_vring_ready after DRIVER_OK

2023-01-17 Thread Maxime Coquelin
Hi Eugenio, On 1/13/23 11:03, Eugenio Perez Martin wrote: On Fri, Jan 13, 2023 at 10:51 AM Stefano Garzarella wrote: On Fri, Jan 13, 2023 at 09:19:00AM +0100, Eugenio Perez Martin wrote: On Fri, Jan 13, 2023 at 5:36 AM Jason Wang wrote: On Fri, Jan 13, 2023 at 1:25 AM Eugenio Pérez

Re: [PULL v4 76/83] vhost-user: Support vhost_dev_start

2023-01-17 Thread Maxime Coquelin
On 1/17/23 13:36, Greg Kurz wrote: On Tue, 17 Jan 2023 13:12:57 +0100 Greg Kurz wrote: Hi Maxime, On Tue, 17 Jan 2023 10:49:37 +0100 Maxime Coquelin wrote: Hi Yajun, On 1/16/23 08:14, Yajun Wu wrote: Not quite sure about the whole picture. Seems while qemu waiting response

Re: [PULL v4 76/83] vhost-user: Support vhost_dev_start

2023-01-17 Thread Maxime Coquelin
oftmmu/main.c:37 #57 0x556e7c3c in main (argc=71, argv=0x7fffcda8) at ../softmmu/main.c:48 -Original Message- From: Maxime Coquelin Sent: Thursday, January 12, 2023 5:26 PM To: Laurent Vivier Cc: qemu-devel@nongnu.org; Peter Maydell ; Yajun Wu ; Parav Pandit ; Michael S. Tsirkin

Re: [PULL v4 76/83] vhost-user: Support vhost_dev_start

2023-01-12 Thread Maxime Coquelin
Hi Laurent, On 1/11/23 10:50, Laurent Vivier wrote: On 1/9/23 11:55, Michael S. Tsirkin wrote: On Fri, Jan 06, 2023 at 03:21:43PM +0100, Laurent Vivier wrote: Hi, it seems this patch breaks vhost-user with DPDK. See https://bugzilla.redhat.com/show_bug.cgi?id=2155173 it seems QEMU doesn't

Re: [PATCH v6 5/8] libvduse: Add VDUSE (vDPA Device in Userspace) library

2022-06-03 Thread Maxime Coquelin
Hi Yongji, On 5/23/22 10:46, Xie Yongji wrote: VDUSE [1] is a linux framework that makes it possible to implement software-emulated vDPA devices in userspace. This adds a library as a subproject to help implementing VDUSE backends in QEMU. [1]

[PATCH 2/5] virtio-net: prepare for variable RSS key and indir table lengths

2022-04-08 Thread Maxime Coquelin
This patch is a preliminary rework to support RSS with Vhost-user backends. It enables supporting different types of hashes, key lengths and indirection table lengths. This patch does not introduces behavioral changes. Signed-off-by: Maxime Coquelin --- ebpf/ebpf_rss.c| 8

[PATCH 3/5] virtio-net: add RSS support for Vhost backends

2022-04-08 Thread Maxime Coquelin
This patch introduces new Vhost backend callbacks to support RSS, and makes them called in Virtio-net device. It will be used by Vhost-user backend implementation to support RSS feature. Signed-off-by: Maxime Coquelin --- hw/net/vhost_net-stub.c | 10 ++ hw/net/vhost_net.c

[PATCH 5/5] vhost-user: add RSS support

2022-04-08 Thread Maxime Coquelin
This patch implements the RSS feature to the Vhost-user backend. The implementation supports up to 52 bytes RSS key length, and 512 indirection table entries. Signed-off-by: Maxime Coquelin --- hw/virtio/vhost-user.c | 146 - 1 file changed, 145

[PATCH 4/5] docs: introduce RSS support in Vhost-user specification

2022-04-08 Thread Maxime Coquelin
is to provide the slave with driver's RSS configuration. Signed-off-by: Maxime Coquelin --- docs/interop/vhost-user.rst | 57 + 1 file changed, 57 insertions(+) diff --git a/docs/interop/vhost-user.rst b/docs/interop/vhost-user.rst index 4dbc84fd00..9de6297568 100644

[PATCH 1/5] ebpf: pass and check RSS key length to the loader

2022-04-08 Thread Maxime Coquelin
to the loader, and validate it is 40 bytes before copying it. Signed-off-by: Maxime Coquelin --- ebpf/ebpf_rss-stub.c | 3 ++- ebpf/ebpf_rss.c | 11 +++ ebpf/ebpf_rss.h | 3 ++- hw/net/virtio-net.c | 3 ++- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ebpf

[PATCH 0/5] Vhost-user: add Virtio RSS support

2022-04-08 Thread Maxime Coquelin
distribution. DPDK Vhost-user backend PoC implementing the new requests can be found here [0], it only implements the messages handling, it does not perform any RSS for now. [0]: https://gitlab.com/mcoquelin/dpdk-next-virtio/-/commits/vhost_user_rss_poc/ Maxime Coquelin (5): ebpf: pass and check

Re: [PATCH v3] vdpa: reset the backend device in the end of vhost_net_stop()

2022-03-31 Thread Maxime Coquelin
Hi, On 3/31/22 10:55, Jason Wang wrote: On Thu, Mar 31, 2022 at 1:20 PM <08005...@163.com> wrote: Hi: For some reason, I see the patch as an attachment. We are starting to see this more and more since yesterday on DPDK mailing list. It seems like an issue with mimecast, when the From: tag

Re: VHOST_USER_PROTOCOL_F_VDPA

2020-09-10 Thread Maxime Coquelin
Hi Stefan, On 8/21/20 1:08 PM, Stefan Hajnoczi wrote: > The first vDPA ioctls have been added to the vhost-user protocol and I > wonder if it's time to fully change the vhost-user protocol's focus to > providing a full VIRTIO device model like vDPA does. > > Initially vhost-user was just used

Re: [PATCH v1 09/10] vhost-vdpa: introduce vhost-vdpa backend

2020-06-30 Thread Maxime Coquelin
On 6/22/20 5:37 PM, Cindy Lu wrote: > Currently we have 2 types of vhost backends in QEMU: vhost kernel and > vhost-user. The above patch provides a generic device for vDPA purpose, > this vDPA device exposes to user space a non-vendor-specific configuration > interface for setting up a vhost

Re: [PATCH] docs: vhost-user: add Virtio status protocol feature

2020-06-18 Thread Maxime Coquelin
On 6/18/20 2:50 PM, Jason Wang wrote: > > On 2020/6/18 下午7:29, Maxime Coquelin wrote: >> This patch specifies the VHOST_USER_SET_STATUS and >> VHOST_USER_GET_STATUS requests, which are sent by >> the master to update and query the Virtio status >> in the backen

[PATCH v3] docs: vhost-user: add Virtio status protocol feature

2020-06-18 Thread Maxime Coquelin
This patch specifies the VHOST_USER_SET_STATUS and VHOST_USER_GET_STATUS requests, which are sent by the master to update and query the Virtio status in the backend. Signed-off-by: Maxime Coquelin --- Changes since v2: = - Typo: fix missing # (Jason) Changes since v1

[PATCH] docs: vhost-user: add Virtio status protocol feature

2020-06-18 Thread Maxime Coquelin
This patch specifies the VHOST_USER_SET_STATUS and VHOST_USER_GET_STATUS requests, which are sent by the master to update and query the Virtio status in the backend. Signed-off-by: Maxime Coquelin --- Changes since v1: = - Only keep the spec part in this patch

Re: [PATCH] vhost-user: add support for VHOST_USER_SET_STATUS

2020-05-14 Thread Maxime Coquelin
On 5/14/20 4:48 PM, Michael S. Tsirkin wrote: > On Thu, May 14, 2020 at 04:39:26PM +0200, Maxime Coquelin wrote: >> >> >> On 5/14/20 12:51 PM, Michael S. Tsirkin wrote: >>> On Thu, May 14, 2020 at 12:14:32PM +0200, Maxime Coquelin wrote: >>>> >

Re: [PATCH] vhost-user: add support for VHOST_USER_SET_STATUS

2020-05-14 Thread Maxime Coquelin
On 5/14/20 4:20 PM, Michael S. Tsirkin wrote: > On Thu, May 14, 2020 at 04:12:32PM +0200, Maxime Coquelin wrote: >> >> >> >> On 5/14/20 12:44 PM, Michael S. Tsirkin wrote: >>> On Thu, May 14, 2020 at 09:33:32AM +0200, Maxime Coquelin wrote: >>>>

Re: [PATCH] vhost-user: add support for VHOST_USER_SET_STATUS

2020-05-14 Thread Maxime Coquelin
On 5/14/20 12:51 PM, Michael S. Tsirkin wrote: > On Thu, May 14, 2020 at 12:14:32PM +0200, Maxime Coquelin wrote: >> >> >> On 5/14/20 9:53 AM, Jason Wang wrote: >>> >>> On 2020/5/14 下午3:33, Maxime Coquelin wrote: >>>> It is usefull for the Vho

Re: [PATCH] vhost-user: add support for VHOST_USER_SET_STATUS

2020-05-14 Thread Maxime Coquelin
On 5/14/20 12:44 PM, Michael S. Tsirkin wrote: > On Thu, May 14, 2020 at 09:33:32AM +0200, Maxime Coquelin wrote: >> It is usefull for the Vhost-user backend to know >> about about the Virtio device status updates, >> especially when the driver s

Re: [PATCH] vhost-user: add support for VHOST_USER_SET_STATUS

2020-05-14 Thread Maxime Coquelin
On 5/14/20 9:53 AM, Jason Wang wrote: > > On 2020/5/14 下午3:33, Maxime Coquelin wrote: >> It is usefull for the Vhost-user backend to know >> about about the Virtio device status updates, >> especially when the driver sets the DRIVER_OK bit. >> >> With

[PATCH] vhost-user: add support for VHOST_USER_SET_STATUS

2020-05-14 Thread Maxime Coquelin
It is usefull for the Vhost-user backend to know about about the Virtio device status updates, especially when the driver sets the DRIVER_OK bit. With that information, no more need to do hazardous assumptions on when the driver is done with the device configuration. Signed-off-by: Maxime

Re: [RFC v1 3/4] vhost-vdpa: implement vhost-vdpa backend

2020-05-07 Thread Maxime Coquelin
On 4/20/20 11:32 AM, Cindy Lu wrote: > diff --git a/include/hw/virtio/vhost-backend.h > b/include/hw/virtio/vhost-backend.h > index 6f6670783f..d81bd9885f 100644 > --- a/include/hw/virtio/vhost-backend.h > +++ b/include/hw/virtio/vhost-backend.h > @@ -17,7 +17,8 @@ typedef enum

Re: [RFC v1 3/4] vhost-vdpa: implement vhost-vdpa backend

2020-05-07 Thread Maxime Coquelin
On 4/20/20 11:32 AM, Cindy Lu wrote: > Currently we have 2 types of vhost backends in QEMU: vhost kernel and > vhost-user. The above patch provides a generic device for vDPA purpose, > this vDPA device exposes to user space a non-vendor-specific configuration > interface for setting up a vhost

Re: [Qemu-devel] [PATCH v1 09/16] virtio: fill/flush/pop for packed ring

2018-11-30 Thread Maxime Coquelin
Hi Wei, On 11/22/18 3:06 PM, w...@redhat.com wrote: +void virtqueue_flush(VirtQueue *vq, unsigned int count) +{ +if (unlikely(vq->vdev->broken)) { +vq->inuse -= count; +return; +} + +if (virtio_vdev_has_feature(vq->vdev, VIRTIO_F_RING_PACKED)) { +

Re: [Qemu-devel] [RFC v2 6/8] virtio: flush/push for packed ring

2018-11-28 Thread Maxime Coquelin
Hi Wei, On 9/20/18 4:13 PM, Maxime Coquelin wrote:   } @@ -575,6 +630,34 @@ void virtqueue_flush(VirtQueue *vq, unsigned int count)   vq->signalled_used_valid = false;   } +static void virtqueue_packed_flush(VirtQueue *vq, unsigned int count) +{ +    if (unlikely(!vq->vrin

Re: [Qemu-devel] [PATCH v1 13/16] virtio: add vhost-net migration of packed ring

2018-11-28 Thread Maxime Coquelin
On 11/22/18 3:06 PM, w...@redhat.com wrote: From: Wei Xu tweaked vhost-net code to test migration. @@ -1414,64 +1430,20 @@ long vhost_vring_ioctl(struct vhost_dev r = -EFAULT; break; } + vq->last_avail_idx = s.num & 0x7FFF; +

Re: [Qemu-devel] [PATCH v1 13/16] virtio: add vhost-net migration of packed ring

2018-11-28 Thread Maxime Coquelin
On 11/22/18 3:06 PM, w...@redhat.com wrote: From: Wei Xu tweaked vhost-net code to test migration. @@ -1414,64 +1430,20 @@ long vhost_vring_ioctl(struct vhost_dev r = -EFAULT; break; } + vq->last_avail_idx = s.num & 0x7FFF; +

Re: [Qemu-devel] [PATCH v1 00/16] packed ring virtio-net backend support

2018-11-22 Thread Maxime Coquelin
Hi Wei, I just tested your series with Tiwei's v3, and it fails with ctrl vq enabled: qemu-system-x86_64: virtio-net ctrl missing headers Regards, Maxime On 11/22/18 3:06 PM, w...@redhat.com wrote: From: Wei Xu Code base: https://github.com/Whishay/qemu.git rfc v3 -> v1 - migration

Re: [Qemu-devel] [[RFC v3 12/12] virtio: feature vhost-net support for packed ring

2018-11-21 Thread Maxime Coquelin
Hi Wei, On 10/11/18 4:08 PM, w...@redhat.com wrote: From: Wei Xu (cherry picked from commit 305a2c4640c15c5717245067ab937fd10f478ee6) Signed-off-by: Wei Xu (cherry picked from commit 46476dae6f44c6fef8802a4a0ac7d0d79fe399e3) Signed-off-by: Wei Xu --- hw/virtio/vhost.c | 3 +++

Re: [Qemu-devel] [RFC 0/2] vhost+postcopy fixes

2018-10-10 Thread Maxime Coquelin
++- 2 files changed, 13 insertions(+), 5 deletions(-) For the series: Reviewed-by: Maxime Coquelin Thanks, Maxime

Re: [Qemu-devel] [PATCH v3 0/2] intel_iommu: handle invalid ce for shadow sync

2018-10-09 Thread Maxime Coquelin
/i386/intel_iommu.c | 55 +++ 2 files changed, 30 insertions(+), 27 deletions(-) For the series: Reviewed-by: Maxime Coquelin

Re: [Qemu-devel] [PATCH] vhost-user: Don't ask for reply on postcopy mem table set

2018-10-02 Thread Maxime Coquelin
. David Alan Gilbert Fixes: 9bb38019942c ("vhost+postcopy: Send address back to qemu") Signed-off-by: Ilya Maximets --- hw/virtio/vhost-user.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) Reviewed-by: Maxime Coquelin Thanks, Maxime

Re: [Qemu-devel] [RFC v2 8/8] virtio: guest driver reload for vhost-net

2018-09-21 Thread Maxime Coquelin
On 09/21/2018 04:33 AM, Jason Wang wrote: On 2018年09月21日 04:39, Maxime Coquelin wrote: Hi Wei, Jason, On 06/19/2018 09:53 AM, Wei Xu wrote: On Wed, Jun 06, 2018 at 11:48:19AM +0800, Jason Wang wrote: On 2018å¹´06月06æ—¥ 03:08, w...@redhat.com wrote: From: Wei Xu last_avail

Re: [Qemu-devel] [RFC v2 8/8] virtio: guest driver reload for vhost-net

2018-09-20 Thread Maxime Coquelin
Hi Wei, Jason, On 06/19/2018 09:53 AM, Wei Xu wrote: On Wed, Jun 06, 2018 at 11:48:19AM +0800, Jason Wang wrote: On 2018年06月06日 03:08, w...@redhat.com wrote: From: Wei Xu last_avail, avail_wrap_count, used_idx and used_wrap_count are needed to support vhost-net backend, all these are

Re: [Qemu-devel] [RFC v2 2/8] virtio: memory cache for packed ring

2018-09-20 Thread Maxime Coquelin
On 06/05/2018 09:07 PM, w...@redhat.com wrote: From: Wei Xu Mostly reuse memory cache with 1.0 except for the offset calculation. Signed-off-by: Wei Xu --- hw/virtio/virtio.c | 29 - 1 file changed, 20 insertions(+), 9 deletions(-) diff --git

Re: [Qemu-devel] [RFC v2 6/8] virtio: flush/push for packed ring

2018-09-20 Thread Maxime Coquelin
On 06/05/2018 09:08 PM, w...@redhat.com wrote: From: Wei Xu Signed-off-by: Wei Xu Signed-off-by: Wei Xu --- hw/virtio/virtio.c | 109 ++--- 1 file changed, 96 insertions(+), 13 deletions(-) diff --git a/hw/virtio/virtio.c

Re: [Qemu-devel] [PATCH] intel_iommu: handle invalid ce for shadow sync

2018-09-13 Thread Maxime Coquelin
Zhang CC: Pei Zhang CC: Alex Williamson CC: Jason Wang CC: Maxime Coquelin CC: Michael S. Tsirkin CC: QEMU Stable Fixes:https://bugzilla.redhat.com/show_bug.cgi?id=1627272 It seems like a regression as it wasn't reported earlier, isn't it? If it is, do you know what is the faulty commit? Signed-off

Re: [Qemu-devel] [PATCH v2 2/2] vhost-user: back SET/GET_CONFIG requests with a protocol feature

2018-03-29 Thread Maxime Coquelin
On 03/29/2018 10:05 AM, Liu, Changpeng wrote: -Original Message- From: Maxime Coquelin [mailto:maxime.coque...@redhat.com] Sent: Thursday, March 29, 2018 3:56 PM To: Liu, Changpeng <changpeng@intel.com>; m...@redhat.com; marcandre.lur...@redhat.com; qemu-devel@nongnu.org S

[Qemu-devel] [PATCH v3 1/2] vhost-user-blk: set config ops before vhost-user init

2018-03-29 Thread Maxime Coquelin
As soon as vhost-user init is done, the backend may send VHOST_USER_SLAVE_CONFIG_CHANGE_MSG, so let's set the notification callback before it. Also, it will be used to know whether the device supports the config feature to advertize it or not. Signed-off-by: Maxime Coquelin <maxime.co

Re: [Qemu-devel] [PATCH v2 2/2] vhost-user: back SET/GET_CONFIG requests with a protocol feature

2018-03-29 Thread Maxime Coquelin
On 03/29/2018 02:57 AM, Liu, Changpeng wrote: -Original Message- From: Maxime Coquelin [mailto:maxime.coque...@redhat.com] Sent: Thursday, March 29, 2018 3:28 AM To: m...@redhat.com; Liu, Changpeng <changpeng@intel.com>; marcandre.lur...@redhat.com; qemu-devel@nongnu.

[Qemu-devel] [PATCH v3 0/2] vhost-user: Back SET/GET_CONFIG with a protocol feature

2018-03-29 Thread Maxime Coquelin
if device implements config feature but the backend doesn't. (mst) Maxime Coquelin (2): vhost-user-blk: set config ops before vhost-user init vhost-user: back SET/GET_CONFIG requests with a protocol feature docs/interop/vhost-user.txt | 21 - hw/block/vhost-user-blk.c | 4

[Qemu-devel] [PATCH v3 2/2] vhost-user: back SET/GET_CONFIG requests with a protocol feature

2018-03-29 Thread Maxime Coquelin
the feature but the backend doesn't. The backend should only send VHOST_USER_SLAVE_CONFIG_CHANGE_MSG requests if the protocol feature has been negotiated. Signed-off-by: Maxime Coquelin <maxime.coque...@redhat.com> --- docs/interop/vhost-user.txt | 21 - hw/virtio/vhost-

Re: [Qemu-devel] [PATCH v2 1/2] vhost-user-blk: set config ops before vhost-user init

2018-03-29 Thread Maxime Coquelin
On 03/29/2018 02:53 AM, Liu, Changpeng wrote: -Original Message- From: Maxime Coquelin [mailto:maxime.coque...@redhat.com] Sent: Thursday, March 29, 2018 3:28 AM To: m...@redhat.com; Liu, Changpeng <changpeng@intel.com>; marcandre.lur...@redhat.com; qemu-devel@nongnu.

[Qemu-devel] [PATCH v2 2/2] vhost-user: back SET/GET_CONFIG requests with a protocol feature

2018-03-28 Thread Maxime Coquelin
the feature but the backend doesn't. The backend should only send VHOST_USER_SLAVE_CONFIG_CHANGE_MSG requests if the protocol feature has been negotiated. Signed-off-by: Maxime Coquelin <maxime.coque...@redhat.com> --- docs/interop/vhost-user.txt | 21 - hw/virtio/vhost-

[Qemu-devel] [PATCH v2 0/2] vhost-user: Back SET/GET_CONFIG with a protocol feature

2018-03-28 Thread Maxime Coquelin
these requests in this release. *NOTE*: The series has only been tested as I don't have the environment to try it. Changpeng, can you please test it? Thanks, Maxime Changes since v1: = - Fail vhost-user init if device implements config feature but the backend doesn't. (mst) Maxime

[Qemu-devel] [PATCH v2 1/2] vhost-user-blk: set config ops before vhost-user init

2018-03-28 Thread Maxime Coquelin
As soon as vhost-user init is done, the backend may send VHOST_USER_SLAVE_CONFIG_CHANGE_MSG, so let's set the notification callback before it. Also, it will be used to know whether the device supports the config feature to advertize it or not. Signed-off-by: Maxime Coquelin <maxime.co

Re: [Qemu-devel] [PATCH 2/2] vhost-user: back SET/GET_CONFIG requests with a protocol feature

2018-03-28 Thread Maxime Coquelin
On 03/28/2018 06:55 PM, Michael S. Tsirkin wrote: On Wed, Mar 28, 2018 at 05:56:57PM +0200, Maxime Coquelin wrote: Without a dedicated protocol feature, QEMU cannot know whether the backend can handle VHOST_USER_SET_CONFIG and VHOST_USER_GET_CONFIG messages. This patch adds a protocol

Re: [Qemu-devel] [PATCH 0/2] vhost-user: Back SET/GET_CONFIG with a protocol feature

2018-03-28 Thread Maxime Coquelin
On 03/28/2018 05:56 PM, Maxime Coquelin wrote: Hi, While reviewing DPDK series adding support to VHOST_USER_SET_CONFIG and VHOST_USER_GET_CONFIG request, I found that it was not backed with a dedicated protocol feature. This series addresses this by adding a new protocol feature bit

[Qemu-devel] [PATCH 1/2] vhost-user-blk: set config ops before vhost-user init

2018-03-28 Thread Maxime Coquelin
As soon as vhost-user init is done, the backend may send VHOST_USER_SLAVE_CONFIG_CHANGE_MSG, so let's set the notification callback before it. Also, it will be used to know whether the device supports the config feature to advertize it or not. Signed-off-by: Maxime Coquelin <maxime.co

[Qemu-devel] [PATCH 2/2] vhost-user: back SET/GET_CONFIG requests with a protocol feature

2018-03-28 Thread Maxime Coquelin
VHOST_USER_SLAVE_CONFIG_CHANGE_MSG requests if the protocol feature has been negotiated. Signed-off-by: Maxime Coquelin <maxime.coque...@redhat.com> --- docs/interop/vhost-user.txt | 21 - hw/virtio/vhost-user.c | 17 + 2 files changed, 29 insertions(+), 9 del

[Qemu-devel] [PATCH 0/2] vhost-user: Back SET/GET_CONFIG with a protocol feature

2018-03-28 Thread Maxime Coquelin
to try it. Changpeng, can you please test it? Thanks, Maxime Maxime Coquelin (2): vhost-user-blk: set config ops before vhost-user init vhost-user: back SET/GET_CONFIG requests with a protocol feature docs/interop/vhost-user.txt | 21 - hw/block/vhost-user-blk.c | 4

Re: [Qemu-devel] [PULL v4 02/29] vhost-user: add new vhost user messages to support virtio config space

2018-03-28 Thread Maxime Coquelin
Hi, On 01/18/2018 09:44 PM, Michael S. Tsirkin wrote: From: Changpeng Liu Add VHOST_USER_GET_CONFIG/VHOST_USER_SET_CONFIG messages which can be used for live migration of vhost user devices, also vhost user devices can benefit from the messages to get/set virtio

Re: [Qemu-devel] [RFC 2/5] vhost-user: Introduce new request to send virtio device status

2018-02-27 Thread Maxime Coquelin
On 02/27/2018 04:01 PM, Michael S. Tsirkin wrote: On Fri, Feb 16, 2018 at 06:29:07PM +0100, Maxime Coquelin wrote: diff --git a/docs/interop/vhost-user.txt b/docs/interop/vhost-user.txt index 9fcf48d611..daa452bd36 100644 --- a/docs/interop/vhost-user.txt +++ b/docs/interop/vhost-user.txt

Re: [Qemu-devel] [PATCH 3/6] vhost-user-test: add back memfd check

2018-02-23 Thread Maxime Coquelin
<marcandre.lur...@redhat.com> --- tests/vhost-user-test.c | 93 +++-- 1 file changed, 66 insertions(+), 27 deletions(-) Looks good to me: Acked-by: Maxime Coquelin <maxime.coque...@redhat.com> Thanks, Maxime

Re: [Qemu-devel] [PATCH 4/6] vhost-user-test: do not hang if chardev creation failed

2018-02-23 Thread Maxime Coquelin
ic --debug-log to see it. Later, it would make sense to use g_critical() instead, and catch errors with g_test_expect_message() (in glib 2.34). Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> --- tests/vhost-user-test.c | 1 + 1 file changed, 1 insertion(+) Acked-by:

[Qemu-devel] [RFC 3/5] vhost_net: send virtio device status update to the backend

2018-02-16 Thread Maxime Coquelin
This patch adds ans uses a new function to send virtio device status updates to the backend. Suggested-by: Stefan Hajnoczi <stefa...@redhat.com> Signed-off-by: Maxime Coquelin <maxime.coque...@redhat.com> --- hw/net/vhost_net.c | 10 ++ hw/net/virtio-net.c | 7

[Qemu-devel] [RFC 2/5] vhost-user: Introduce new request to send virtio device status

2018-02-16 Thread Maxime Coquelin
This patch implements the .vhost_set_virtio_status() backend callback for user backend by intooducing a new vhost-user VHOST_USER_SET_VIRTIO_STATUS request. Suggested-by: Stefan Hajnoczi <stefa...@redhat.com> Signed-off-by: Maxime Coquelin <maxime.coque...@redhat.com> --- docs/i

[Qemu-devel] [RFC 5/5] vhost-user-scsi: send virtio status to the backend

2018-02-16 Thread Maxime Coquelin
Suggested-by: Stefan Hajnoczi <stefa...@redhat.com> Signed-off-by: Maxime Coquelin <maxime.coque...@redhat.com> --- hw/scsi/vhost-user-scsi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/scsi/vhost-user-scsi.c b/hw/scsi/vhost-user-scsi.c index 9389ed48e0..da36a3b7f5 100

[Qemu-devel] [RFC 4/5] vhost-user-blk: send virtio status to the backend

2018-02-16 Thread Maxime Coquelin
Suggested-by: Stefan Hajnoczi <stefa...@redhat.com> Signed-off-by: Maxime Coquelin <maxime.coque...@redhat.com> --- hw/block/vhost-user-blk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c index b53b4c9c57..a88b6f13a4 100

[Qemu-devel] [RFC 0/5] vhost-user: Forward virtio device status updates

2018-02-16 Thread Maxime Coquelin
. A solution has yet to be found for legacy devices. Maxime Coquelin (5): vhost: send virtio device status update to the backend vhost-user: Introduce new request to send virtio device status vhost_net: send virtio device status update to the backend vhost-user-blk: send virtio status to the backend

[Qemu-devel] [RFC 1/5] vhost: send virtio device status update to the backend

2018-02-16 Thread Maxime Coquelin
This patch adds a function to notify the vhost backend with virtio device status updates. Suggested-by: Stefan Hajnoczi <stefa...@redhat.com> Signed-off-by: Maxime Coquelin <maxime.coque...@redhat.com> --- hw/virtio/vhost.c | 11 +++ include/hw/virtio/vhost-ba

Re: [Qemu-devel] [PATCH] libvhost-user: Support across-memory-boundary access

2018-02-08 Thread Maxime Coquelin
|3 +- 2 files changed, 122 insertions(+), 14 deletions(-) Reviewed-by: Maxime Coquelin <maxime.coque...@redhat.com> Thanks, Maxime

Re: [Qemu-devel] [PATCH] libvhost-user: Fix resource leak

2018-02-08 Thread Maxime Coquelin
Xie <xieyon...@baidu.com> --- contrib/libvhost-user/libvhost-user.c | 14 ++ 1 file changed, 14 insertions(+) Reviewed-by: Maxime Coquelin <maxime.coque...@redhat.com> Thanks, Maxime

Re: [Qemu-devel] [PATCH 2/4] vhost-user: specify and implement VHOST_USER_SET_QUEUE_NUM request

2018-01-16 Thread Maxime Coquelin
On 01/16/2018 04:05 AM, Michael S. Tsirkin wrote: On Fri, Jan 12, 2018 at 03:56:56PM +0100, Maxime Coquelin wrote: When the slave cannot add queues dynamically, Could you please clarify the motivation a bit Why is it such a big deal to resize the queue array? We know no queues are used

Re: [Qemu-devel] [PATCH 4/4] virtio-net: notify backend with number of queue pairs setup

2018-01-16 Thread Maxime Coquelin
On 01/16/2018 04:07 AM, Michael S. Tsirkin wrote: On Fri, Jan 12, 2018 at 03:56:58PM +0100, Maxime Coquelin wrote: Signed-off-by: Maxime Coquelin <maxime.coque...@redhat.com> --- hw/net/virtio-net.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/net/virtio-net.c b/

Re: [Qemu-devel] [PATCH 1/4] vhost-user: fix multiple queue specification

2018-01-16 Thread Maxime Coquelin
On 01/16/2018 04:00 AM, Michael S. Tsirkin wrote: On Fri, Jan 12, 2018 at 03:56:55PM +0100, Maxime Coquelin wrote: The number of queues supported by the slave is queried with message VHOST_USER_GET_QUEUE_NUM, not with message VHOST_USER_GET_PROTOCOL_FEATURES. Also, looking at master

[Qemu-devel] [PATCH 2/4] vhost-user: specify and implement VHOST_USER_SET_QUEUE_NUM request

2018-01-12 Thread Maxime Coquelin
When the slave cannot add queues dynamically, it needs to know for how many queues to wait to be initialized. This patch introduce new vhost-user protocol feature & request for the master to send the number of queue pairs allocated by the driver. Signed-off-by: Maxime Coquelin <maxim

[Qemu-devel] [PATCH 0/4] vhost-user: notify backend with number of queues setup

2018-01-12 Thread Maxime Coquelin
of them. However, the problem can be reproduced with Windows guest, when QEMU declares more queue pairs than vcpus. In this case, the Windows virtio-net driver only setup as much queue pairs as vcpus. [0]: https://lists.nongnu.org/archive/html/qemu-devel/2018-01/msg02484.html Maxime Coquelin (4

[Qemu-devel] [PATCH 1/4] vhost-user: fix multiple queue specification

2018-01-12 Thread Maxime Coquelin
of queues. Signed-off-by: Maxime Coquelin <maxime.coque...@redhat.com> --- docs/interop/vhost-user.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/interop/vhost-user.txt b/docs/interop/vhost-user.txt index d49444e037..8a14191a1e 100644 --- a/docs/interop

[Qemu-devel] [PATCH 4/4] virtio-net: notify backend with number of queue pairs setup

2018-01-12 Thread Maxime Coquelin
Signed-off-by: Maxime Coquelin <maxime.coque...@redhat.com> --- hw/net/virtio-net.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 38674b08aa..b8908c98ed 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -561,6 +561,7 @@

[Qemu-devel] [PATCH 3/4] vhost-net: add vhost_net_set_queue_num helper

2018-01-12 Thread Maxime Coquelin
This patch adds a new help to notify the backend with the number of queue pairs setup by the guest driver. Signed-off-by: Maxime Coquelin <maxime.coque...@redhat.com> --- hw/net/vhost_net.c | 17 + include/net/vhost_net.h | 1 + 2 files changed, 18 insertions(+) diff

Re: [Qemu-devel] [PATCH] vhost: fix corrupting GPA 0 when using uninitialized queues

2018-01-12 Thread Maxime Coquelin
_virtqueue_start(hdev, vdev, hdev->vqs + i, Thanks, it fixes the silent corruption that happens with vhost-user net backend and Windows guests, when the number of queues pairs declared in Qemu is higher than the number of vcpus. Tested-by: Maxim

Re: [Qemu-devel] [PATCH v3 0/5] vhost-user-test: Fixes & code clean-up

2017-12-22 Thread Maxime Coquelin
On 12/21/2017 11:49 PM, Michael S. Tsirkin wrote: On Thu, Dec 21, 2017 at 10:21:20PM +0100, Maxime Coquelin wrote: Sorry, I missed to fixup the feature mask in patch 4, this is the only change in this v3. The two changes in v2 are fixing the features mask before the function rework

[Qemu-devel] [PATCH v3 4/5] vhost-user-test: make features mask an init_virtio_dev() argument

2017-12-21 Thread Maxime Coquelin
The goal is to generalize the use of [un]init_virtio_dev() to all tests, which does not necessarily expose the same features set. Signed-off-by: Maxime Coquelin <maxime.coque...@redhat.com> --- tests/vhost-user-test.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-)

[Qemu-devel] [PATCH v3 3/5] vhost-user-test: setup virtqueues in all tests

2017-12-21 Thread Maxime Coquelin
Only the multiqueue test setups the virtqueues. This patch generalizes the setup of virtqueues for all tests. Signed-off-by: Maxime Coquelin <maxime.coque...@redhat.com> --- tests/vhost-user-test.c | 53 +++-- 1 file changed, 42 insertions(

[Qemu-devel] [PATCH v3 5/5] vhost-user-test: use init_virtio_dev in multiqueue test

2017-12-21 Thread Maxime Coquelin
Now that init_virtio_dev() has been generalized to all cases, use it in test_multiqueue() to avoid code duplication. Signed-off-by: Maxime Coquelin <maxime.coque...@redhat.com> --- tests/vhost-user-test.c | 65 ++--- 1 file changed, 8 insertions(

[Qemu-devel] [PATCH v3 2/5] vhost-user-test: extract read-guest-mem test from main loop

2017-12-21 Thread Maxime Coquelin
This patch makes read-guest-test consistent with other tests, i.e. create the test server in the test function. Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Signed-off-by: Maxime Coquelin <maxime.coque...@redhat.com> --- tests/vhost-user

[Qemu-devel] [PATCH v3 0/5] vhost-user-test: Fixes & code clean-up

2017-12-21 Thread Maxime Coquelin
on is done with regard to device initialization so that all tests share the same init. Maxime Coquelin (5): vhost-user-test: fix features mask vhost-user-test: extract read-guest-mem test from main loop vhost-user-test: setup virtqueues in all tests vhost-user-test: make features mask an init_

[Qemu-devel] [PATCH v3 1/5] vhost-user-test: fix features mask

2017-12-21 Thread Maxime Coquelin
VIRTIO_NET_F_MAC is a bit position, not a bit mask. Signed-off-by: Maxime Coquelin <maxime.coque...@redhat.com> --- tests/vhost-user-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c index e2c89ed376..43c6528644

  1   2   3   4   >