Re: [PATCH 3/3] vhost-user-blk: add an option to skip GET_VRING_BASE for force shutdown

2025-07-06 Thread Raphael Norwitz
I think others should weigh in on the higher level abstractions you're adding for vhost_user_blk_force_stop() - I don't have a strong perspective on them. I'm ok with this for vhost-user-blk. Acked-by: Raphael Norwitz On Mon, Jun 9, 2025 at 5:26 PM Daniil Tatianin wrote: &

Re: [PATCH 3/3] vhost-user: return failure if backend crash when live migration

2025-03-15 Thread Raphael Norwitz
I'll let others chime in on higher level device model changes you're making. For the vhost-user-blk and vhost-user-scsi bits: On Sun, Mar 9, 2025 at 11:41 AM Haoqian He wrote: > > Live migration should be terminated if backend crash. nit: "...if the backend crashes before the migration completes

Re: [PATCH v5 0/3] vhost-user-blk: live resize additional APIs

2024-07-01 Thread Raphael Norwitz
I have no issues with these APIs, but I'm not a QMP expert so others should review those bits. For the vhost-user-blk code: Acked-by: Raphael Norwitz On Tue, Jun 25, 2024 at 8:19 AM Vladimir Sementsov-Ogievskiy wrote: > > v5: > 03: drop extra check on is is runstate running

Re: [PATCH v4 2/2] vhost-user: fix lost reconnect again

2024-05-15 Thread Raphael Norwitz
ensure that even if vhost_dev_init initialization fails, the event > handler still needs to be reinstalled when s->connected is false. > > All vhost-user devices have this issue, including vhost-user-blk/scsi. > > Fixes: 71e076a07d ("hw/virtio: generalise CHR_EVENT_CLOSED handlin

Re: [PATCH v4 1/2] Revert "vhost-user: fix lost reconnect"

2024-05-15 Thread Raphael Norwitz
from the guest os, > s->connected has no chance to be set to false, resulting in > subsequent reconnection not being executed. > > The next patch will completely fix this issue with a better approach. > Reviewed-by: Raphael Norwitz > Signed-off-by: Li Feng >

Re: [PATCH v3 2/2] vhost-user: fix lost reconnect again

2024-05-15 Thread Raphael Norwitz
OK - I'm happy with this approach then. On Wed, May 15, 2024 at 10:48 PM Li Feng wrote: > > > > 2024年5月15日 23:47,Raphael Norwitz 写道: > > The case your describing makes sense but now I have some concerns on > the vhost_dev_cleanup bit. > > On Wed, May 15

Re: [PATCH v3 2/2] vhost-user: fix lost reconnect again

2024-05-15 Thread Raphael Norwitz
The case your describing makes sense but now I have some concerns on the vhost_dev_cleanup bit. On Wed, May 15, 2024 at 1:47 AM Li Feng wrote: > > > > > 2024年5月14日 21:58,Raphael Norwitz 写道: > > > > Code looks good. Just a question on the error case you're tryin

Re: [PATCH v3 1/2] Revert "vhost-user: fix lost reconnect"

2024-05-15 Thread Raphael Norwitz
On Wed, May 15, 2024 at 1:47 AM Li Feng wrote: > > > > > 2024年5月14日 21:58,Raphael Norwitz 写道: > > > > The code for these two patches looks fine. Just some questions on the > > failure case you're trying to fix. > > > > > > On Tue, May 14

Re: [PATCH v3 2/2] vhost-user: fix lost reconnect again

2024-05-14 Thread Raphael Norwitz
Code looks good. Just a question on the error case you're trying to fix. On Tue, May 14, 2024 at 2:12 AM Li Feng wrote: > > When the vhost-user is reconnecting to the backend, and if the vhost-user > fails > at the get_features in vhost_dev_init(), then the reconnect will fail > and it will not

Re: [PATCH v3 1/2] Revert "vhost-user: fix lost reconnect"

2024-05-14 Thread Raphael Norwitz
The code for these two patches looks fine. Just some questions on the failure case you're trying to fix. On Tue, May 14, 2024 at 2:12 AM Li Feng wrote: > > This reverts commit f02a4b8e6431598612466f76aac64ab492849abf. > > Since the current patch cannot completely fix the lost reconnect > problem

Re: [PATCH 1/2] vhost-user: fix the reconnect error

2023-11-27 Thread Raphael Norwitz
> On Nov 23, 2023, at 12:54 AM, Li Feng wrote: > > If the error occurs in vhost_dev_init, the value of s->connected is set to > true > in advance, and there is no chance to enter this function execution again > in the future. > > Signed-off-by: Li Feng R

Re: [PATCH 2/2] vhost-user-scsi: free the inflight area when reset

2023-11-27 Thread Raphael Norwitz
> On Nov 23, 2023, at 12:54 AM, Li Feng wrote: > > Keep it the same to vhost-user-blk. > At the same time, fix the vhost_reset_device. > > Signed-off-by: Li Feng Reviewed-by: Raphael Norwitz > --- > hw/scsi/vhost-user-scsi.c | 16 > hw/virtio/

Re: [PATCH 1/4] vhost-user-blk: simplify and fix vhost_user_blk_handle_config_change

2023-10-23 Thread Raphael Norwitz
I don’t understand the “valid for resize only” comment. Looks like this is zero day behavior and I can’t tell why it was added. Does anyone know? With that, reasoning and code looks good: Acked-by: Raphael Norwitz > On Oct 6, 2023, at 4:20 PM, Vladimir Sementsov-Ogievskiy >

Re: [RFC PATCH 48/78] contrib/vhost-user-scsi: add fallthrough pseudo-keyword

2023-10-23 Thread Raphael Norwitz
> On Oct 13, 2023, at 3:48 AM, Emmanouil Pitsidianakis > wrote: > > In preparation of raising -Wimplicit-fallthrough to 5, replace all > fall-through comments with the fallthrough attribute pseudo-keyword. > > Signed-off-by: Emmanouil Pitsidianakis Reviewe

Re: [RFC PATCH 47/75] contrib/vhost-user-scsi: add fallthrough pseudo-keyword

2023-10-23 Thread Raphael Norwitz
> On Oct 13, 2023, at 3:48 AM, Emmanouil Pitsidianakis > wrote: > > Signed-off-by: Emmanouil Pitsidianakis Reviewed-by: Raphael Norwitz > --- > contrib/vhost-user-scsi/vhost-user-scsi.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --gi

Re: [PATCH v6 4/5] vhost-user-scsi: start vhost when guest kicks

2023-09-28 Thread Raphael Norwitz
> On Sep 22, 2023, at 7:46 AM, Li Feng wrote: > > Let's keep the same behavior as vhost-user-blk. > > Some old guests kick virtqueue before setting VIRTIO_CONFIG_S_DRIVER_OK. > Reviewed-by: Raphael Norwitz > Signed-off-by: Li Feng > --- >

Re: [PATCH v6 1/5] vhost-user-common: send get_inflight_fd once

2023-09-28 Thread Raphael Norwitz
> On Sep 22, 2023, at 7:46 AM, Li Feng wrote: > > Currently the get_inflight_fd will be sent every time the device is started, > and > the backend will allocate shared memory to save the inflight state. If the > backend finds that it receives the second get_inflight_fd, it will release the > p

Re: [PATCH v6 5/5] vhost-user: fix lost reconnect

2023-09-28 Thread Raphael Norwitz
t; All vhost-user devices have this issue, including vhost-user-blk/scsi. > > With this patch, if the vdev->vdev is null, the fd callback will still > be reinstalled. > > Fixes: 71e076a07d ("hw/virtio: generalise CHR_EVENT_CLOSED handling") > Reviewed-by: Raphael N

Re: [PATCH v6 3/5] vhost-user-scsi: support reconnect to backend

2023-09-28 Thread Raphael Norwitz
One comment on the logging stuff in vhost-scsi. As far as I can tell the logging in vhost-user-scsi looks good. Markus - does this look better to you? Otherwise do you think we should also fix up the vhost-user-blk realize function? > On Sep 22, 2023, at 7:46 AM, Li Feng wrote: > > If the bac

Re: [PATCH v6 5/5] vhost-user: fix lost reconnect

2023-09-28 Thread Raphael Norwitz
t; All vhost-user devices have this issue, including vhost-user-blk/scsi. > > With this patch, if the vdev->vdev is null, the fd callback will still > be reinstalled. > > Fixes: 71e076a07d ("hw/virtio: generalise CHR_EVENT_CLOSED handling") > Reviewed-by: Raphael N

Re: [PATCH v3 2/2] vhost: Add Error parameter to vhost_scsi_common_start()

2023-08-30 Thread Raphael Norwitz
> On Aug 30, 2023, at 12:57 AM, Li Feng wrote: > > Add a Error parameter to report the real error, like vhost-user-blk. > Reviewed-by: Raphael Norwitz > Signed-off-by: Li Feng > --- > hw/scsi/vhost-scsi-common.c | 16 +--- > hw/scsi/vhost-scsi

Re: [PATCH v3 1/2] vhost-user: Fix lost reconnect

2023-08-30 Thread Raphael Norwitz
t; All vhost-user devices have this issue, including vhost-user-blk/scsi. > > With this patch, if the vdev->vdev is null, the fd callback will still > be reinstalled. > > Fixes: 71e076a07d ("hw/virtio: generalise CHR_EVENT_CLOSED handling") > Reviewed-by: Raphael

Re: [PATCH v2 2/2] vhost: Add Error parameter to vhost_scsi_common_start()

2023-08-29 Thread Raphael Norwitz
> On Aug 24, 2023, at 3:41 AM, Li Feng wrote: > > Add a Error parameter to report the real error, like vhost-user-blk. > > Signed-off-by: Li Feng Reviewed-by: Raphael Norwitz > --- > hw/scsi/vhost-scsi-common.c | 16 +--- > hw/scsi/vhost-scsi

Re: [PATCH v2 1/2] vhost-user: Fix lost reconnect

2023-08-29 Thread Raphael Norwitz
vhost-user devices have this issue, including vhost-user-blk/scsi. > > With this patch, if the vdev->vdev is null, the fd callback will still > be reinstalled. > > Fixes: 71e076a07d ("hw/virtio: generalise CHR_EVENT_CLOSED handling") > A couple of NITs, otherwise

Re: [PATCH v3 5/5] vhost-user-scsi: start vhost when guest kicks

2023-07-31 Thread Raphael Norwitz
> On Jul 31, 2023, at 8:10 AM, Li Feng wrote: > > Let's keep the same behavior as vhost-user-blk. > > Some old guests kick virtqueue before setting VIRTIO_CONFIG_S_DRIVER_OK. > > Signed-off-by: Li Feng Reviewed-by: Raphael Norwitz > --- >

Re: [PATCH v3 4/5] vhost-user-scsi: support reconnect to backend

2023-07-31 Thread Raphael Norwitz
> On Jul 31, 2023, at 8:10 AM, Li Feng wrote: > > If the backend crashes and restarts, the device is broken. > This patch adds reconnect for vhost-user-scsi. > > Tested with spdk backend. > > Signed-off-by: Li Feng Reviewed-by: Raphael Norwitz > ---

Re: [PATCH v3 2/5] vhost-user-common: send get_inflight_fd once

2023-07-31 Thread Raphael Norwitz
t will release the > previous shared memory, which breaks inflight working logic. > > This patch is a preparation for the following patches. > > Signed-off-by: Li Feng Reviewed-by: Raphael Norwitz > --- > hw/scsi/vhost-scsi-common.c | 37 ++---

Re: [PATCH v2 2/4] vhost-user-common: send get_inflight_fd once

2023-07-31 Thread Raphael Norwitz
> On Jul 31, 2023, at 7:38 AM, Li Feng wrote: > > > >> 2023年7月31日 06:13,Raphael Norwitz 写道: >> >>> >>> On Jul 28, 2023, at 3:49 AM, Li Feng wrote: >>> >>> >>> >>>> 2023年7月28日 下午2:04,Michael S

Re: [PATCH v2 4/4] vhost-user-scsi: support reconnect to backend

2023-07-30 Thread Raphael Norwitz
I don’t think we should be changing any vhost-scsi-common code here. I’d rather implement wrappers around vhost_user_scsi_start/stop() around vhost_user_scsi_common_start/stop() and check started_vu there. Otherwise I think this is looking good. Glad to see you caught the vhost_user_scsi_handl

Re: [PATCH v2 2/4] vhost-user-common: send get_inflight_fd once

2023-07-30 Thread Raphael Norwitz
> On Jul 28, 2023, at 3:49 AM, Li Feng wrote: > > > >> 2023年7月28日 下午2:04,Michael S. Tsirkin 写道: >> >> On Tue, Jul 25, 2023 at 06:42:45PM +0800, Li Feng wrote: >>> Get_inflight_fd is sent only once. When reconnecting to the backend, >>> qemu sent set_inflight_fd to the backend. >> >> I don't

Re: [PATCH v2 3/4] vhost: move and rename the conn retry times

2023-07-30 Thread Raphael Norwitz
> On Jul 25, 2023, at 6:42 AM, Li Feng wrote: > > Multile devices need this macro, move it to a common header. > > Signed-off-by: Li Feng Reviewed-by: Raphael Norwitz > --- > hw/block/vhost-user-blk.c | 4 +--- > hw/virtio/vhost-user-gpio.c | 3 +-- > incl

Re: [PATCH] vhost-user-scsi: support reconnect to backend

2023-07-30 Thread Raphael Norwitz
> On Jul 28, 2023, at 3:48 AM, Li Feng wrote: > > Thanks for your reply. > >> 2023年7月28日 上午5:21,Raphael Norwitz 写道: >> >> >> >>> On Jul 25, 2023, at 6:19 AM, Li Feng wrote: >>> >>> Thanks for your comments. >>> &g

Re: [PATCH v2 1/4] vhost: fix the fd leak

2023-07-30 Thread Raphael Norwitz
gned-off-by: Li Feng Reviewed-by: Raphael Norwitz > --- > hw/virtio/vhost.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c > index abf0d03c8d..e2f6ffb446 100644 > --- a/hw/virtio/vhost.c > +++ b/hw/virtio/vhost.c > @@

Re: [PATCH] vhost-user-scsi: support reconnect to backend

2023-07-27 Thread Raphael Norwitz
> On Jul 25, 2023, at 6:19 AM, Li Feng wrote: > > Thanks for your comments. > >> 2023年7月25日 上午1:21,Raphael Norwitz 写道: >> >> Very excited to see this. High level looks good modulo a few small things. >> >> My major concern is around existing vhost-

Re: [PATCH] vhost-user-scsi: support reconnect to backend

2023-07-24 Thread Raphael Norwitz
Very excited to see this. High level looks good modulo a few small things. My major concern is around existing vhost-user-scsi backends which don’t support VHOST_USER_PROTOCOL_F_INFLIGHT_SHMFD. IMO we should hide the reconnect behavior behind a VHOST_USER_PROTOCOL_F_INFLIGHT_SHMFD check. We may

Re: [PATCH] block/vhost-user-blk: Fix hang on boot for some odd guests

2023-04-17 Thread Raphael Norwitz
Hey Andrey - apologies for the late reply here. It sounds like you are dealing with a buggy guest, rather than a QEMU issue. > On Apr 10, 2023, at 11:39 AM, Andrey Ryabinin wrote: > > > > On 4/10/23 10:35, Andrey Ryabinin wrote: >> Some guests hang on boot when using the vhost-user-blk-pci de

Re: [PATCH v3 7/7] hw/virtio: generalise CHR_EVENT_CLOSED handling

2022-11-29 Thread Raphael Norwitz
> On Nov 29, 2022, at 12:30 AM, Michael S. Tsirkin wrote: > > On Tue, Nov 29, 2022 at 05:18:58AM +, Raphael Norwitz wrote: >>> On Nov 28, 2022, at 11:41 AM, Alex Bennée wrote: >>> >>> ..and use for both virtio-user-blk and virtio-user-gpio. This avoids

Re: [PATCH v3 7/7] hw/virtio: generalise CHR_EVENT_CLOSED handling

2022-11-28 Thread Raphael Norwitz
> On Nov 28, 2022, at 11:41 AM, Alex Bennée wrote: > > ..and use for both virtio-user-blk and virtio-user-gpio. This avoids > the circular close by deferring shutdown due to disconnection until a > later point. virtio-user-blk already had this mechanism in place so The mechanism was originally c

Re: [PATCH for-7.2] vhost: enable vrings in vhost_dev_start() for vhost-user devices

2022-11-24 Thread Raphael Norwitz
> On Nov 24, 2022, at 2:54 AM, Stefano Garzarella wrote: > > On Thu, Nov 24, 2022 at 01:50:19AM -0500, Michael S. Tsirkin wrote: >> On Thu, Nov 24, 2022 at 12:19:25AM +, Raphael Norwitz wrote: >>> >>> > On Nov 23, 2022, at 8:16 AM, Stefano Garzarel

Re: [PATCH for-7.2] vhost: enable vrings in vhost_dev_start() for vhost-user devices

2022-11-23 Thread Raphael Norwitz
> > [1] https://gitlab.com/virtio-fs/virtiofsd > [2] > https://github.com/rust-vmm/vhost/blob/240fc2966/crates/vhost-user-backend/src/event_loop.rs#L217 > Fixes: 02b61f38d3 ("hw/virtio: incorporate backend features in features") > Reported-by: German Maglione &

Re: [PATCH] vhost: mask VIRTIO_F_RING_RESET for vhost and vhost-user devices

2022-11-21 Thread Raphael Norwitz
ce VIRTIO_F_RING_RESET is negotiated > by the guest (Linux >= v6.0), but not supported by the device. > > Fixes: 69e1c14aa2 ("virtio: core: vq reset feature negotation support") > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1318 > Signed-off-by: Stefano Garzarella Looks good. For vhost-user-blk and vhost-user-scsi: Acked-by: Raphael Norwitz

Re: [PATCH v2] hw/virtio/vhost-user: support obtain vdpa device's mac address automatically

2022-09-21 Thread Raphael Norwitz
If I read your response on the other thread correctly, this change is intended to prioritize the MAC address exposed by DPDK over the one provided by the QEMU command line? Sounds reasonable in principle, but I would get confirmation from vDPA/vhost-net maintainers. That said the way you’re h

Re: [PATCH] hw/virtio/vhost-user: support obtain vdpa device's mac address automatically

2022-09-20 Thread Raphael Norwitz
I have some concerns from the vhost-user-blk side. >On Tue, Sep 13, 2022 at 5:13 PM Hao Chen wrote: >> >> When use dpdk-vdpa tests vdpa device. You need to specify the mac address to >> start the virtual machine through libvirt or qemu, but now, the libvirt or >> qemu can call dpdk vdpa ven

Re: [PATCH] vhost-user-blk: fix the resize crash

2022-09-20 Thread Raphael Norwitz
Feng fen...@smartx.com<mailto:fen...@smartx.com> Reviewed-by: Raphael Norwitz >--- > hw/block/vhost-user-blk.c | 4 > 1 file changed, 4 insertions(+) > >diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c >index 9117222456..db30bb754f 100644 &g

Re: [PATCH v3 0/5] vhost-user-blk: dynamically resize config space based on features

2022-09-12 Thread Raphael Norwitz
> Thanks for reviewing! Could you send a Pull request? Or do we need an > ack from someone else? mst typically includes the vhost-user-blk patches in his PRs. Usually a few other people review but I'm not sure it's required. A lot of folks have been busy prepping for KVM Forum the last few weeks

Re: [PATCH v3 0/5] vhost-user-blk: dynamically resize config space based on features

2022-09-06 Thread Raphael Norwitz
Thanks for the changes. For the whole series: Reviewed-by: Raphael Norwitz On Tue, Sep 06, 2022 at 10:31:06AM +0300, Daniil Tatianin wrote: > This patch set attempts to align vhost-user-blk with virtio-blk in > terms of backward compatibility and flexibility. It also improves > the vi

Re: [PATCH v2 1/8] virtio: introduce VirtIOConfigSizeParams & virtio_get_config_size

2022-09-04 Thread Raphael Norwitz
> I can squash the first four if that would be better. I think so. Just may be easier for other reviewers :)

Re: [PATCH v2 8/8] vhost-user-blk: dynamically resize config space based on features

2022-09-02 Thread Raphael Norwitz
of migration failed: Invalid argument > > This is caused by the newer (destination) VM requiring a bigger BAR0 > alignment because it has to cover a bigger configuration space, which > isn't actually needed since those additional config fields are not > active (write-zeroes/discard).

Re: [PATCH v2 4/8] virtio: remove the virtio_feature_get_config_size helper

2022-09-02 Thread Raphael Norwitz
On Fri, Aug 26, 2022 at 05:32:44PM +0300, Daniil Tatianin wrote: > This has no more users and is superseded by virtio_get_config_size. > > Signed-off-by: Daniil Tatianin Reviewed-by: Raphael Norwitz > --- > hw/virtio/virtio.c | 15 --- > include/hw/vi

Re: [PATCH v2 3/8] virtio-net: utilize VirtIOConfigSizeParams & virtio_get_config_size

2022-09-02 Thread Raphael Norwitz
On Fri, Aug 26, 2022 at 05:32:43PM +0300, Daniil Tatianin wrote: > Use the new common helper. As an added bonus this also makes use of > config size sanity checking via the 'max_size' field. > > Signed-off-by: Daniil Tatianin > --- > hw/net/virtio-net.c | 8 ++-- > 1 file changed, 6 insertio

Re: [PATCH v2 7/8] vhost-user-blk: make 'config_wce' part of 'host_features'

2022-09-02 Thread Raphael Norwitz
On Fri, Aug 26, 2022 at 05:32:47PM +0300, Daniil Tatianin wrote: > No reason to have this be a separate field. This also makes it more akin > to what the virtio-blk device does. > > Signed-off-by: Daniil Tatianin Reviewed-by: Raphael Norwitz > --- > hw/block/vhost-user-

Re: [PATCH v2 6/8] vhost-user-blk: make it possible to disable write-zeroes/discard

2022-09-02 Thread Raphael Norwitz
On Fri, Aug 26, 2022 at 05:32:46PM +0300, Daniil Tatianin wrote: > It is useful to have the ability to disable these features for > compatibility with older VMs that don't have these implemented. > > Signed-off-by: Daniil Tatianin Reviewed-by: Raphael Norwitz > --- &g

Re: [PATCH v2 5/8] virtio-blk: move config size params to virtio-blk-common

2022-09-02 Thread Raphael Norwitz
The vhost-user-blk bits in meson.build and Maintainers should probably be in patch 8? Otherwise LGTM. On Fri, Aug 26, 2022 at 05:32:45PM +0300, Daniil Tatianin wrote: > This way we can reuse it for other virtio-blk devices, e.g > vhost-user-blk, which currently does not control its config space s

Re: [PATCH v2 2/8] virtio-blk: utilize VirtIOConfigSizeParams & virtio_get_config_size

2022-09-02 Thread Raphael Norwitz
On Fri, Aug 26, 2022 at 05:32:42PM +0300, Daniil Tatianin wrote: > Use the common helper instead of duplicating the same logic. > > Signed-off-by: Daniil Tatianin Reviewed-by: Raphael Norwitz > --- > hw/block/virtio-blk.c | 16 +++- > 1 file changed, 7 insertio

Re: [PATCH v2 1/8] virtio: introduce VirtIOConfigSizeParams & virtio_get_config_size

2022-09-02 Thread Raphael Norwitz
I feel like it would be easier to review if the first 4 patches were squashed together, but that’s not a big deal. For this one: Reviewed-by: Raphael Norwitz On Fri, Aug 26, 2022 at 05:32:41PM +0300, Daniil Tatianin wrote: > This is the first step towards moving all device config s

Re: [PATCH v2 0/8] vhost-user-blk: dynamically resize config space based on features

2022-09-01 Thread Raphael Norwitz
> ping Apologies for the late review - busy week. First pass looks good but will review comprehensively tomorrow or over the weekend.

Re: [PATCH v4 11/22] hw/virtio: move vhd->started check into helper and add FIXME

2022-08-07 Thread Raphael Norwitz
g at the vhost level. I do agree we shouldn't re-use vdev->started. Maybe we should add another 'active' variable in vhost_dev? I'm happy to send a patch for that. Until we agree on a better solution I'm happy with the FIXME. Reviewed-by: Raphael Norwitz > >

Re: [PATCH 1/3] docs/vhost-user: Clarifications for VHOST_USER_ADD/REM_MEM_REG

2022-04-08 Thread Raphael Norwitz
it to describe the > existing behaviour of libvhost-user (guest address, user address and > size must match). > > Signed-off-by: Kevin Wolf Reviewed-by: Raphael Norwitz > --- > docs/interop/vhost-user.rst | 17 + > 1 file changed, 17 insertions(+) &g

Re: [PATCH 3/3] vhost-user: Don't pass file descriptor for VHOST_USER_REM_MEM_REG

2022-04-08 Thread Raphael Norwitz
implementation that doesn't send a file descriptor. Keep > accepting, but ignoring a file descriptor for compatibility with older > QEMU versions. > > Signed-off-by: Kevin Wolf Reviewed-by: Raphael Norwitz > --- > hw/virtio/vhost-user.c| 2 +- >

Re: [PATCH 2/3] libvhost-user: Fix extra vu_add/rem_mem_reg reply

2022-04-08 Thread Raphael Norwitz
tcopy part of the message handler for these > two commands. > > Signed-off-by: Kevin Wolf Reviewed-by: Raphael Norwitz > --- > subprojects/libvhost-user/libvhost-user.c | 9 +++-- > 1 file changed, 3 insertions(+), 6 deletions(-) > > diff --git a/subprojects/libvhost

Re: [PATCH] hw/vhost-user-blk: fix ioeventfd add failed when start reenter

2022-03-31 Thread Raphael Norwitz
High level looks good but I have some questions. Rather than a new boolean I'd rather we re-used started_vu by changing it to an enum and having different values for starting and started. On Tue, Mar 29, 2022 at 12:15:46AM +0800, Jie Wang wrote: > During Virtio1.0 dev(start_on_kick) in vhost_user

Re: [PATCH 10/10] vhost-user-blk: propagate error return from generic vhost

2021-11-29 Thread Raphael Norwitz
Roman Kagan wrote: > Fix the only callsite that doesn't propagate the error code from the > generic vhost code. > > Signed-off-by: Roman Kagan > --- Reviewed-by: Raphael Norwitz > hw/block/vhost-user-blk.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >

Re: [PATCH 01/10] vhost-user-blk: reconnect on any error during realize

2021-11-29 Thread Raphael Norwitz
ts is limited it seems > harmless to try reconnecting on any error. > > So relax the condition of whether to retry connecting to check for any > error. > > This patch amends a527e312b5 "vhost-user-blk: Implement reconnection > during realize". > > Signed-off-by: Ro

Re: [PATCH 01/10] vhost-user-blk: reconnect on any error during realize

2021-11-29 Thread Raphael Norwitz
> > > > I see. I hadn't looked at the rest of the series yet because I ran out > > of time, but now that I'm skimming them, I see quite a few places that > > use non-EPROTO, but I wonder which of them actually should be > > reconnected. So far all I saw were presumably persistent errors where a >

Re: [PATCH] hw/vhost-user-blk: turn on VIRTIO_BLK_F_SIZE_MAX feature for virtio blk device

2021-11-29 Thread Raphael Norwitz
rdware spec. Grammar here. Should be something like "...DMA request sizes which are to large for the hardware spec". > > Signed-off-by: Andy Pei Acked-by: Raphael Norwitz > --- > hw/block/vhost-user-blk.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/bl

Re: [PATCH] vhost-user: Fix backends without multiqueue support

2021-07-08 Thread Raphael Norwitz
> Set it to 1 if the backend doesn't have multiqueue support. > > Fixes: c90bd505a3e8210c23d69fecab9ee6f56ec4a161 > Signed-off-by: Kevin Wolf Reviewed-by: Raphael Norwitz > --- > hw/virtio/vhost-user.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --g

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

2021-06-11 Thread Raphael Norwitz
onnection error occurs and we reconnect, the error > message is printed using error_report_err(), but otherwise ignored. > > Signed-off-by: Kevin Wolf Reviewed-by: Raphael Norwitz > --- > hw/block/vhost-user-blk.c | 14 +- > 1 file changed, 13 insertions(+), 1 deletion(

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

2021-06-11 Thread Raphael Norwitz
sconnecting the > chardev, add this while touching the code. > > Signed-off-by: Kevin Wolf Reviewed-by: Raphael Norwitz > --- > hw/block/vhost-user-blk.c | 48 ++- > 1 file changed, 32 insertions(+), 16 deletions(-) > > diff --git a/hw/

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

2021-06-11 Thread Raphael Norwitz
inguished in the caller. > > Signed-off-by: Kevin Wolf Just one commmit message suggestion. Reviewed-by: Raphael Norwitz > --- > include/hw/virtio/vhost-backend.h | 2 +- > include/hw/virtio/vhost.h | 4 ++-- > hw/block/vhost-user-blk.c | 9 +

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

2021-06-11 Thread Raphael Norwitz
On Wed, Jun 09, 2021 at 05:46:55PM +0200, Kevin Wolf wrote: > Instead of letting the caller make up a meaningless error message, add > an Error parameter to allow reporting the real error. > > Signed-off-by: Kevin Wolf Reviewed-by: Raphael Norwitz > --- > hw/block/vho

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

2021-06-11 Thread Raphael Norwitz
re callbacks in VhostOps to return > 0/-errno: .vhost_set_owner(), .vhost_get_features() and > .vhost_virtqueue_set_busyloop_timeout(). The implementations of these > functions are trivial as they generally just send a message to the > backend. > > Signed-off-by: Kevin Wo

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

2021-06-11 Thread Raphael Norwitz
nnection goes away, without ending up > in an endless loop if it's a permanent error in the configuration. > > Signed-off-by: Kevin Wolf Reviewed-by: Raphael Norwitz > --- > include/hw/virtio/vhost-backend.h | 3 ++- > hw/virtio/vhost-backend.c

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

2021-06-11 Thread Raphael Norwitz
. The others just keep printing the error with > error_report_err(). > > Signed-off-by: Kevin Wolf Reviewed-by: Raphael Norwitz > --- > include/hw/virtio/vhost.h| 2 +- > backends/cryptodev-vhost.c | 5 - > backends/vhost-user.c| 4 ++-- > hw/block

Re: [PATCH v2 1/6] vhost-user-blk: Make sure to set Error on realize failure

2021-05-03 Thread Raphael Norwitz
Acked-by: Raphael Norwitz On Thu, Apr 29, 2021 at 07:13:11PM +0200, Kevin Wolf wrote: > We have to set errp before jumping to virtio_err, otherwise the caller > (virtio_device_realize()) will take this as success and crash when it > later tries to access things that we've alread

Re: [PATCH v2 2/6] vhost-user-blk: Don't reconnect during initialisation

2021-05-03 Thread Raphael Norwitz
So we're not going with the suggestion to retry once or a fixed number of times? Any reason why not? On Thu, Apr 29, 2021 at 07:13:12PM +0200, Kevin Wolf wrote: > This is a partial revert of commits 77542d43149 and bc79c87bcde. > > Usually, an error during initialisation means that the configurat

Re: [PATCH 1/5] vhost-user-blk: Don't reconnect during initialisation

2021-04-29 Thread Raphael Norwitz
On Thu, Apr 29, 2021 at 02:48:52PM +0200, Kevin Wolf wrote: > So maybe patch 2 should come first and also fix the preexisting bug, and > of course this patch needs a v2 that doesn't introduce the new instances > of the bug. Sounds good to me. > > Kevin >

Re: [PATCH 2/5] vhost-user-blk: Use Error more consistently

2021-04-29 Thread Raphael Norwitz
Makes sense - I see why it makes reporting better at realize time. Thanks for the clarification. On Thu, Apr 29, 2021 at 11:26:29AM +0200, Kevin Wolf wrote: > Am 28.04.2021 um 20:08 hat Raphael Norwitz geschrieben: > > Code looks ok - question about the commit message. > > > &

Re: [PATCH 4/5] virtio: Fail if iommu_platform is requested, but unsupported

2021-04-29 Thread Raphael Norwitz
Got it - thanks for the clarification. Reviewed-by: Raphael Norwitz On Thu, Apr 29, 2021 at 11:34:11AM +0200, Kevin Wolf wrote: > Am 28.04.2021 um 21:24 hat Raphael Norwitz geschrieben: > > On Thu, Apr 22, 2021 at 07:02:20PM +0200, Kevin Wolf wrote: > > > Commit 2943b53f

Re: [PATCH 5/5] vhost-user-blk: Check that num-queues is supported by backend

2021-04-28 Thread Raphael Norwitz
Reviewed-by: Raphael Norwitz On Thu, Apr 22, 2021 at 07:02:21PM +0200, Kevin Wolf wrote: > Creating a device with a number of queues that isn't supported by the > backend is pointless, the device won't work properly and the error > messages are rather confusing. > >

Re: [PATCH 4/5] virtio: Fail if iommu_platform is requested, but unsupported

2021-04-28 Thread Raphael Norwitz
On Thu, Apr 22, 2021 at 07:02:20PM +0200, Kevin Wolf wrote: > Commit 2943b53f6 (' virtio: force VIRTIO_F_IOMMU_PLATFORM') made sure > that vhost can't just reject VIRTIO_F_IOMMU_PLATFORM when it was > requested. However, just adding it back to the negotiated flags isn't > right either because it pr

Re: [PATCH 3/5] vhost-user-blk: Get more feature flags from vhost devicey

2021-04-28 Thread Raphael Norwitz
Acked-by: Raphael Norwitz On Thu, Apr 22, 2021 at 07:02:19PM +0200, Kevin Wolf wrote: > VIRTIO_F_RING_PACKED and VIRTIO_F_IOMMU_PLATFORM need to be supported by > the vhost device, otherwise advertising it to the guest doesn't result > in a working configuration. They are currently

Re: [PATCH 1/5] vhost-user-blk: Don't reconnect during initialisation

2021-04-28 Thread Raphael Norwitz
On Wed, Apr 28, 2021 at 07:31:13PM +0200, Kevin Wolf wrote: > Am 28.04.2021 um 18:52 hat Raphael Norwitz geschrieben: > > Given what you've shown with the use-after-free, I agree the changes > > need to be reverted. I'm a little uneasy about removing the reconnect

Re: [PATCH 2/5] vhost-user-blk: Use Error more consistently

2021-04-28 Thread Raphael Norwitz
Code looks ok - question about the commit message. Acked-by: Raphael Norwitz On Thu, Apr 22, 2021 at 07:02:18PM +0200, Kevin Wolf wrote: > Now that vhost_user_blk_connect() is not called from an event handler > any more, but directly from vhost_user_blk_device_realize(), we don'

Re: [PATCH 1/5] vhost-user-blk: Don't reconnect during initialisation

2021-04-28 Thread Raphael Norwitz
Given what you've shown with the use-after-free, I agree the changes need to be reverted. I'm a little uneasy about removing the reconnect logic from the device realization completely though. On Thu, Apr 22, 2021 at 07:02:17PM +0200, Kevin Wolf wrote: > This is a partial revert of commits 77542d43

Re: [PATCH v2] vhost-user-blk: Fail gracefully on too large queue size

2021-04-13 Thread Raphael Norwitz
oo \ > -device vhost-user-blk-pci,queue-size=4096,chardev=foo > > Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1935014 > Signed-off-by: Kevin Wolf > --- > hw/block/vhost-user-blk.c | 5 + > 1 file changed, 5 insertions(+) Reviewed-by: Raphael Norwitz > >

Re: [PATCH v2 2/2] vhost-user-blk: perform immediate cleanup if disconnect on initialization

2021-03-24 Thread Raphael Norwitz
Looks good, just clean up the commit message to reflect the way you've now split the patches. Reviewed-by: Raphael Norwitz On Wed, Mar 24, 2021 at 12:38:29PM +0300, Denis Plotnikov wrote: > Commit 4bcad76f4c39 ("vhost-user-blk: delay vhost_user_blk_disconnect") > introduced

Re: [PATCH v2 1/2] vhost-user-blk: use different event handlers on initialization

2021-03-24 Thread Raphael Norwitz
Couple commit message NITs but otherwise I'm happy with this. Reviewed-by: Raphael Norwitz On Wed, Mar 24, 2021 at 12:38:28PM +0300, Denis Plotnikov wrote: > It is useful to use different connect/disconnect event handlers > on device initialization and operation as seen from

Re: [PATCH v1] vhost-user-blk: use different event handlers on init and operation

2021-03-22 Thread Raphael Norwitz
I'm mostly happy with this. My biggest overall comment is that I think this should be split into two, as your refactor using different event handlers for init is a standalone improvement over and above the bugfix. I would have the first commit split out vhost_user_blk_event_init() and vhost_user_b

Re: [PATCH v2 01/12] vhost-user-blk: fix blkcfg->num_queues endianness

2021-01-03 Thread Raphael Norwitz
ss cases. > > Signed-off-by: Stefan Hajnoczi Reviewed-by: Raphael Norwitz > --- > hw/block/vhost-user-blk.c | 7 +++ > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c > index 2dd3d93ca0..d9d9dc8a89

Re: [PATCH v2 1/4] contrib/vhost-user-blk: avoid g_return_val_if() input validation

2020-12-02 Thread Raphael Norwitz
t; accidentally be compiled out. > > Suggested-by: Markus Armbruster > Signed-off-by: Stefan Hajnoczi Reviewed-by: Raphael Norwitz > --- > contrib/vhost-user-blk/vhost-user-blk.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/contrib/vhost-user-bl

Re: [PATCH v5 4/7] tests/qtest/libqos/virtio-blk: add support for vhost-user-blk

2020-09-21 Thread Raphael Norwitz
MST already sent a PR with all the patches :) On Wed, Sep 16, 2020 at 6:13 PM Dima Stepanov wrote: > > On Mon, Sep 14, 2020 at 09:23:42PM -0400, Raphael Norwitz wrote: > > On Fri, Sep 11, 2020 at 4:43 AM Dima Stepanov > > wrote: > > > > > > Add support for

Re: [PATCH v5 4/7] tests/qtest/libqos/virtio-blk: add support for vhost-user-blk

2020-09-14 Thread Raphael Norwitz
On Fri, Sep 11, 2020 at 4:43 AM Dima Stepanov wrote: > > Add support for the vhost-user-blk-pci device. This node can be used by > the vhost-user-blk tests. Tests for the vhost-user-blk device are added > in the following patches. > > Signed-off-by: Dima Stepanov Reviewed-b

Re: [PATCH v4 7/7] tests/qtest/vhost-user-test: enable the reconnect tests

2020-09-08 Thread Raphael Norwitz
This works for me, and looks good, but I figure those who added the check should confirm that these tests are reliable now. Marc-Andre - thoughts? On Fri, Sep 4, 2020 at 5:36 AM Dima Stepanov wrote: > > For now a QTEST_VHOST_USER_FIXME environment variable is used to > separate reconnect tests f

Re: [PATCH v4 6/7] tests/qtest/vhost-user-test: add migrate_reconnect test

2020-09-08 Thread Raphael Norwitz
On Fri, Sep 4, 2020 at 5:36 AM Dima Stepanov wrote: > > Add new migrate_reconnect test for the vhost-user-blk device. Perform a > disconnect after sending response for the VHOST_USER_SET_LOG_BASE > command. > > Signed-off-by: Dima Stepanov Reviewed-by: Raphael Norwitz &g

Re: [PATCH v4 5/7] tests/qtest/vhost-user-test: add support for the vhost-user-blk device

2020-09-08 Thread Raphael Norwitz
On Fri, Sep 4, 2020 at 5:35 AM Dima Stepanov wrote: > > Add vhost_user_ops structure for the vhost-user-blk device class. Add > the test_reconnect and test_migrate tests for this device. > > Signed-off-by: Dima Stepanov Reviewed-by: Raphael Norwitz Just one small suggestion.

Re: [PATCH v4 4/7] tests/qtest/libqos/virtio-blk: add support for vhost-user-blk

2020-09-08 Thread Raphael Norwitz
On Fri, Sep 4, 2020 at 5:34 AM Dima Stepanov wrote: > > Add support for the vhost-user-blk-pci device. This node can be used by > the vhost-user-blk tests. Tests for the vhost-user-blk device are added > in the following patches. > > Signed-off-by: Dima Stepanov > --- > tests/qtest/libqos/virtio

Re: [PATCH v4 3/7] tests/qtest/vhost-user-test: prepare the tests for adding new dev class

2020-09-08 Thread Raphael Norwitz
s provide a new vhost_user_ops structure with the methods to > initialize device, its command line or make a proper vhost-user > responses. > > Signed-off-by: Dima Stepanov Reviewed-by: Raphael Norwitz > --- > tests/qtest/vhost-user-test.c | 105 >

Re: [PATCH v4 2/7] vhost: check queue state in the vhost_dev_set_log routine

2020-09-08 Thread Raphael Norwitz
es such case by checking the return value from the > virtio_queue_get_desc_addr() function call. Add the same check to the > vhost_dev_set_log() routine. > > Signed-off-by: Dima Stepanov Reviewed-by: Raphael Norwitz > --- > hw/virtio/vhost.c | 12 > 1 file change

Re: [PATCH v3 1/7] vhost: recheck dev state in the vhost_migration_log routine

2020-08-31 Thread Raphael Norwitz
igration issue was slightly discussed earlier: > - https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg01509.html > - https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg05241.html > > Signed-off-by: Dima Stepanov Reviewed-by: Raphael Norwitz > --- > hw/block/vhost-use

Re: [PATCH v2 2/7] vhost: check queue state in the vhost_dev_set_log routine

2020-08-31 Thread Raphael Norwitz
On Mon, Aug 31, 2020 at 4:37 AM Dima Stepanov wrote: > > On Thu, Aug 27, 2020 at 09:46:03PM -0400, Raphael Norwitz wrote: > > On Mon, Aug 24, 2020 at 4:41 AM Dima Stepanov > > wrote: > > > > > > If the vhost-user-blk daemon provides only one virtqueue, but

  1   2   >