Re: [PATCH] Rescan the entire target on transport reset when LUN is 0

2020-09-21 Thread Martin K. Petersen
On Fri, 28 Aug 2020 12:21:35 +, Matej Genci wrote: > VirtIO 1.0 spec says > The removed and rescan events ... when sent for LUN 0, they MAY > apply to the entire target so the driver can ask the initiator > to rescan the target to detect this. > > This change introduces the

[PATCH v3] i2c: virtio: add a virtio i2c frontend driver

2020-09-21 Thread Jie Deng
Add an I2C bus driver for virtio para-virtualization. The controller can be emulated by the backend driver in any device model software by following the virtio protocol. This driver communicates with the backend driver through a virtio I2C message structure which includes following parts: -

Re: [PATCH 4/8] vhost scsi: fix cmd completion race

2020-09-21 Thread Bart Van Assche
On 2020-09-21 19:48, Bart Van Assche wrote: > On 2020-09-21 11:23, Mike Christie wrote: >> We might not do the final se_cmd put from vhost_scsi_complete_cmd_work. >> If the last put happens a little later then we could race where >> vhost_scsi_complete_cmd_work does vhost_signal, the guest runs

Re: [PATCH 4/8] vhost scsi: fix cmd completion race

2020-09-21 Thread Bart Van Assche
On 2020-09-21 11:23, Mike Christie wrote: > We might not do the final se_cmd put from vhost_scsi_complete_cmd_work. > If the last put happens a little later then we could race where > vhost_scsi_complete_cmd_work does vhost_signal, the guest runs and sends > more IO, and vhost_scsi_handle_vq runs

Re: [PATCH 2/8] vhost: add helper to check if a vq has been setup

2020-09-21 Thread Bart Van Assche
On 2020-09-21 11:23, Mike Christie wrote: > +bool vhost_vq_is_setup(struct vhost_virtqueue *vq) > +{ > + if (vq->avail && vq->desc && vq->used && vhost_vq_access_ok(vq)) > + return true; > + else > + return false; > +} Has it been considered changing the body of

Re: [PATCH 2/8] vhost: add helper to check if a vq has been setup

2020-09-21 Thread Jason Wang
On 2020/9/22 上午2:23, Mike Christie wrote: This adds a helper check if a vq has been setup. The next patches will use this when we move the vhost scsi cmd preallocation from per session to per vq. In the per vq case, we only want to allocate cmds for vqs that have actually been setup and not for

Re: [PATCH 7/8] vhost: remove work arg from vhost_work_flush

2020-09-21 Thread Jason Wang
On 2020/9/22 上午2:23, Mike Christie wrote: vhost_work_flush doesn't do anything with the work arg. This patch drops it and then renames vhost_work_flush to vhost_work_dev_flush to reflect that the function flushes all the works in the dev and not just a specific queue or work item.

Re: [PATCH 1/8] vhost vdpa: fix vhost_vdpa_open error handling

2020-09-21 Thread Jason Wang
On 2020/9/22 上午2:23, Mike Christie wrote: We must free the vqs array in the open failure path, because vhost_vdpa_release will not be called. Signed-off-by: Mike Christie --- drivers/vhost/vdpa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/vhost/vdpa.c

Re: [PATCH 3/8] vhost scsi: alloc cmds per vq instead of session

2020-09-21 Thread kernel test robot
Hi Mike, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on vhost/linux-next] [also build test WARNING on v5.9-rc6 next-20200921] [cannot apply to target/for-next] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch

Re: [PATCH 1/2] vhost: remove mutex ops in vhost_set_backend_features

2020-09-21 Thread Michael S. Tsirkin
On Tue, Sep 08, 2020 at 09:00:19PM +0800, Zhu, Lingshan wrote: > > On 9/8/2020 8:05 PM, Michael S. Tsirkin wrote: > > On Mon, Sep 07, 2020 at 06:52:19PM +0800, Zhu Lingshan wrote: > > In vhost_vdpa ioctl SET_BACKEND_FEATURES path, currect code > would try to acquire vhost

Re: [PATCH v7 3/3] vhost: add an RPMsg API

2020-09-21 Thread Guennadi Liakhovetski
Hi Mathieu, On Fri, Sep 18, 2020 at 09:52:49AM -0600, Mathieu Poirier wrote: > Good morning, > > On Fri, Sep 18, 2020 at 11:02:29AM +0200, Guennadi Liakhovetski wrote: > > Hi Mathieu, > > > > On Thu, Sep 17, 2020 at 04:01:38PM -0600, Mathieu Poirier wrote: > > > On Thu, Sep 10, 2020 at