[PATCH 1/2] vhost-user: fix lost reconnect

2023-08-03 Thread Li Feng
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 be retriggered forever. The reason is: When the vhost-user fail at get_features, the vhost_dev_cleanup will be called immediately.

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

2023-08-03 Thread Li Feng
Add a Error parameter to report the real error, like vhost-user-blk. Signed-off-by: Li Feng --- hw/scsi/vhost-scsi-common.c | 17 ++--- hw/scsi/vhost-scsi.c | 5 +++-- hw/scsi/vhost-user-scsi.c | 14 -- include/hw/virtio/vhost-scsi-

[PATCH 0/2] Fix vhost reconnect issues

2023-08-03 Thread Li Feng
The patchset fixes the regression issue of vhost reconnect. It's a serious bug that the vhost-user will lose the reconnect forever. The 2nd patch enhances the error handle of vhost-user-scsi. This patchset's parent commit is: https://lore.kernel.org/all/20230731121018.2856310-1-fen...@smartx.com/

Re: [PATCH v8 16/17] linux-user: Do not adjust zero_bss for host page size

2023-08-03 Thread Akihiko Odaki
On 2023/08/04 10:45, Richard Henderson wrote: Rely on target_mmap to handle guest vs host page size mismatch. Signed-off-by: Richard Henderson Reviewed-by: Akihiko Odaki

Re: [PATCH v8 17/17] linux-user: Use zero_bss for PT_LOAD with no file contents too

2023-08-03 Thread Akihiko Odaki
On 2023/08/04 10:45, Richard Henderson wrote: If p_filesz == 0, then vaddr_ef == vaddr. We can reuse the code in zero_bss rather than incompletely duplicating it in load_elf_image. Signed-off-by: Richard Henderson Reviewed-by: Akihiko Odaki

[PATCH] linux-user: Undo incomplete mmap

2023-08-03 Thread Akihiko Odaki
When the host page size is greater than the target page size and MAP_FIXED or MAP_FIXED_NOREPLACE is requested, mmap will be done for three parts: start, middle, and end. If a later part of mmap fail, mmap done in the earlier parts must be reverted. Fixes: 54936004fd ("mmap emulation") Signed-off-

Re: Re: [PULL 22/22] cryptodev: Handle unexpected request to avoid crash

2023-08-03 Thread zhenwei pi
On 8/4/23 12:35, Michael Tokarev wrote: 04.08.2023 01:21, Michael S. Tsirkin wrote: From: zhenwei pi Generally guest side should discover which services the device is able to offer, then do requests on device. However it's also possible to break this rule in a guest. Handle unexpected request

Re: [PULL 22/22] cryptodev: Handle unexpected request to avoid crash

2023-08-03 Thread Michael Tokarev
04.08.2023 09:10, zhenwei pi wrote: .. This smells like a stable-8.0 material. Please let me know if it is not. Both this one [1] and the previous one [2] should be table-8.0 material, I think. [1][PULL 22/22] cryptodev: Handle unexpected request to avoid crash [2][PULL 21/22] virtio-crypto:

<    1   2   3