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 > --- > hw/scsi/vhost-user-scsi.c | 48 ++

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 > --- > hw/scsi/vhost-user-scsi.c

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

2023-07-31 Thread Raphael Norwitz
> On Jul 31, 2023, at 8:10 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 >

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. Tsirkin 写道: On Tue, Jul 25, 2023 at 06:42:45PM +0800, Li Feng wrote: > Get_in

[PATCH] block-migration: Ensure we don't crash during migration cleanup

2023-07-31 Thread Fabiano Rosas
We can fail the blk_insert_bs() at init_blk_migration(), leaving the BlkMigDevState without a dirty_bitmap and BlockDriverState. Account for the possibly missing elements when doing cleanup. Fix the following crashes: Thread 1 "qemu-system-x86" received signal SIGSEGV, Segmentation fault. 0x5

Re: [PULL 0/1] hw/nvme fixes

2023-07-31 Thread Richard Henderson
On 7/30/23 12:29, Klaus Jensen wrote: From: Klaus Jensen Hi, This should also fix coverity cid 1518067 and 1518066. The following changes since commit ccb86f079a9e4d94918086a9df18c1844347aff8: Merge tag 'pull-nbd-2023-07-28' ofhttps://repo.or.cz/qemu/ericb into staging (2023-07-28 09:56:

Re: [PATCH v2 0/3] block: align CoR requests to subclusters

2023-07-31 Thread Andrey Drobyshev
On 7/24/23 16:11, Andrey Drobyshev wrote: > On 7/11/23 20:25, Andrey Drobyshev wrote: >> v1 --> v2: >> * Fixed line indentation; >> * Fixed wording in a comment; >> * Added R-b. >> >> v1: https://lists.nongnu.org/archive/html/qemu-block/2023-06/msg00606.html >> >> Andrey Drobyshev (3): >> bloc

Re: [PATCH v2 0/3] qemu-img: map: implement support for compressed clusters

2023-07-31 Thread Andrey Drobyshev
On 7/24/23 16:10, Andrey Drobyshev wrote: > On 7/6/23 19:30, Andrey Drobyshev wrote: >> v1 --> v2: >> * Add vmdk format to the 1st commit. Tweak commit message accordingly; >> * Make "compressed" field in MapEntry optional. >> >> v1: https://lists.nongnu.org/archive/html/qemu-block/2023-06/msg

Re: [PATCH 0/6] qemu-img: rebase: add compression support

2023-07-31 Thread Andrey Drobyshev
On 7/24/23 16:11, Andrey Drobyshev wrote: > On 6/30/23 13:54, Denis V. Lunev wrote: >> On 6/1/23 21:28, Andrey Drobyshev wrote: >>> This series is adding [-c | --compress] option to "qemu-img rebase" >>> command, which might prove useful for saving some disk space when, for >>> instance, manipulati

[PATCH v3 0/5] Implement reconnect for vhost-user-scsi

2023-07-31 Thread Li Feng
This patchset adds reconnect support for vhost-user-scsi. At the same times, fix vhost fd leak and refactor some code. Changes for v3: - Split the vhost_user_scsi_handle_output to a separate patch; - Move the started_vu from vhost scsi common header to vhost-user-scsi header; - Fix a log print err

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

2023-07-31 Thread Li Feng
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 --- hw/scsi/vhost-user-scsi.c | 48 +++ 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/hw/scsi/vhos

[PATCH v3 1/5] vhost: fix the fd leak

2023-07-31 Thread Li Feng
When the vhost-user reconnect to the backend, the notifer should be cleanup. Otherwise, the fd resource will be exhausted. Fixes: f9a09ca3ea ("vhost: add support for configure interrupt") Signed-off-by: Li Feng Reviewed-by: Raphael Norwitz --- hw/virtio/vhost.c | 2 ++ 1 file changed, 2 insert

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

2023-07-31 Thread Li Feng
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 --- hw/scsi/vhost-user-scsi.c | 199 +--- include/hw/virtio/vhost-user-scsi.h | 4 + 2 files changed, 18

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

2023-07-31 Thread Li Feng
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 previous shared memory, which breaks inflight working logic. Th

[PATCH v3 3/5] vhost: move and rename the conn retry times

2023-07-31 Thread Li Feng
Multiple 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 +-- include/hw/virtio/vhost.h | 2 ++ 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/

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

2023-07-31 Thread Li Feng
> 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. 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,

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

2023-07-31 Thread Li Feng
> 2023年7月31日 06:09,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. > 2023年7月25

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

2023-07-31 Thread Li Feng
> 2023年7月31日 06:14,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 g

Re: [PATCH] Fix some typos in documentation and comments

2023-07-31 Thread Philippe Mathieu-Daudé
On 30/7/23 20:03, Stefan Weil wrote: Signed-off-by: Stefan Weil --- This patch was triggered by a spelling check for the generated QEMU documentation using codespell. It does not try to fix all typos which still exist in the QEMU code, but has a focus on those required to fix the documentation.

Re: [PATCH] Fix some typos in documentation and comments

2023-07-31 Thread Peter Maydell
On Sun, 30 Jul 2023 at 19:55, Stefan Weil via wrote: > > Signed-off-by: Stefan Weil > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: [RFC] migration/block-dirty-bitmap: make loading bitmap for device with iothread future-proof

2023-07-31 Thread Juan Quintela
Fiona Ebner wrote: > The bdrv_create_dirty_bitmap() function (which is also called by > bdrv_dirty_bitmap_create_successor()) uses bdrv_getlength(bs). This is > a wrapper around a coroutine, and when not called in coroutine context > would use bdrv_poll_co(). Such a call would trigger an assert()