Re: [PATCH] virtio: add the queue number check

2020-02-03 Thread Yang Zhong
On Fri, Jan 31, 2020 at 05:22:47PM +0100, Paolo Bonzini wrote: > I have just found this email... sorry for the delay. > > On 10/01/20 07:10, Yang Zhong wrote: > >> No. If virtio-blk works, the bug is in vhost-user-blk; if virtio-blk needs > >> no check in cpu count, vhost-user-blk also doesn't. >

Re: [PATCH] virtio: add the queue number check

2020-02-02 Thread Michael S. Tsirkin
On Fri, Jan 31, 2020 at 05:22:47PM +0100, Paolo Bonzini wrote: > I have just found this email... sorry for the delay. > > On 10/01/20 07:10, Yang Zhong wrote: > >> No. If virtio-blk works, the bug is in vhost-user-blk; if virtio-blk needs > >> no check in cpu count, vhost-user-blk also doesn't. >

Re: [PATCH] virtio: add the queue number check

2020-01-31 Thread Paolo Bonzini
I have just found this email... sorry for the delay. On 10/01/20 07:10, Yang Zhong wrote: >> No. If virtio-blk works, the bug is in vhost-user-blk; if virtio-blk needs >> no check in cpu count, vhost-user-blk also doesn't. >> >> You need to check first if the bug is in QEMU or the vhost-user-blk s

Re: [PATCH] virtio: add the queue number check

2020-01-09 Thread Yang Zhong
On Fri, Jan 03, 2020 at 10:18:58PM +0100, Paolo Bonzini wrote: > Il ven 3 gen 2020, 16:08 Yang Zhong ha scritto: > > > I also tried virtio-blk device like below: > > https://patchwork.kernel.org/cover/10873193/ > > > > The virtio-blk can work with this changes, but vhost-user-blk device >

Re: [PATCH] virtio: add the queue number check

2020-01-06 Thread Yang Zhong
On Fri, Jan 03, 2020 at 10:18:58PM +0100, Paolo Bonzini wrote: > Il ven 3 gen 2020, 16:08 Yang Zhong ha scritto: > > > I also tried virtio-blk device like below: > > https://patchwork.kernel.org/cover/10873193/ > > > > The virtio-blk can work with this changes, but vhost-user-blk device > >

Re: [PATCH] virtio: add the queue number check

2020-01-03 Thread Paolo Bonzini
Il ven 3 gen 2020, 16:08 Yang Zhong ha scritto: > I also tried virtio-blk device like below: > https://patchwork.kernel.org/cover/10873193/ > > The virtio-blk can work with this changes, but vhost-user-blk device > failed with this kernel patch. > > in vhost_virtqueue_start() function,

Re: [PATCH] virtio: add the queue number check

2020-01-03 Thread Yang Zhong
On Mon, Dec 23, 2019 at 06:33:26PM +0100, Paolo Bonzini wrote: > On 23/12/19 15:25, Michael S. Tsirkin wrote: > > On Mon, Dec 23, 2019 at 12:02:18PM +0100, Paolo Bonzini wrote: > >> On 23/12/19 10:18, Yang Zhong wrote: > >>> In this time, the queue number in the front-end block driver is 2, but >

Re: [PATCH] virtio: add the queue number check

2019-12-23 Thread Paolo Bonzini
On 23/12/19 15:25, Michael S. Tsirkin wrote: > On Mon, Dec 23, 2019 at 12:02:18PM +0100, Paolo Bonzini wrote: >> On 23/12/19 10:18, Yang Zhong wrote: >>> In this time, the queue number in the front-end block driver is 2, but >>> the queue number in qemu side is still 4. So the guest virtio_blk

Re: [PATCH] virtio: add the queue number check

2019-12-23 Thread Michael S. Tsirkin
On Mon, Dec 23, 2019 at 12:02:18PM +0100, Paolo Bonzini wrote: > On 23/12/19 10:18, Yang Zhong wrote: > > In this time, the queue number in the front-end block driver is 2, but > > the queue number in qemu side is still 4. So the guest virtio_blk > > driver will failed to create vq with backe

Re: [PATCH] virtio: add the queue number check

2019-12-23 Thread Paolo Bonzini
On 23/12/19 10:18, Yang Zhong wrote: > In this time, the queue number in the front-end block driver is 2, but > the queue number in qemu side is still 4. So the guest virtio_blk > driver will failed to create vq with backend. Where? > There is no "set back" > mechnism for block driver t

Re: [PATCH] virtio: add the queue number check

2019-12-23 Thread Yang Zhong
On Mon, Dec 23, 2019 at 09:44:46AM +0100, Paolo Bonzini wrote: > On 23/12/19 09:28, Yang Zhong wrote: > > In the guest kernel driver, like virtio_blk.c and virtio_scsi.c, > > there are some definitions like below: > > > > num_vqs = min_t(unsigned int, nr_cpu_ids, num_vqs) > > > > If the queue num

Re: [PATCH] virtio: add the queue number check

2019-12-23 Thread Paolo Bonzini
On 23/12/19 09:28, Yang Zhong wrote: > In the guest kernel driver, like virtio_blk.c and virtio_scsi.c, > there are some definitions like below: > > num_vqs = min_t(unsigned int, nr_cpu_ids, num_vqs) > > If the queue number is bigger than vcpu number, the VM will be > stuck in the guest driver be

[PATCH] virtio: add the queue number check

2019-12-23 Thread Yang Zhong
In the guest kernel driver, like virtio_blk.c and virtio_scsi.c, there are some definitions like below: num_vqs = min_t(unsigned int, nr_cpu_ids, num_vqs) If the queue number is bigger than vcpu number, the VM will be stuck in the guest driver because the qemu and guest driver have different queu