Re: [Qemu-devel] [PATCH V2 RFT] vhost_net: don't set backend for the uninitialized virtqueue

2019-04-08 Thread Jason Wang
On 2019/4/1 下午9:44, Michael S. Tsirkin wrote: On Wed, Mar 27, 2019 at 10:27:01AM +0800, Jason Wang wrote: On 2019/3/26 下午8:49, Michael S. Tsirkin wrote: On Tue, Mar 26, 2019 at 02:59:19PM +0800, Jason Wang wrote: On 2019/3/25 下午8:32, Michael S. Tsirkin wrote: On Mon, Mar 25, 2019 at

Re: [Qemu-devel] [PATCH V2 RFT] vhost_net: don't set backend for the uninitialized virtqueue

2019-04-01 Thread Michael S. Tsirkin
On Wed, Mar 27, 2019 at 10:27:01AM +0800, Jason Wang wrote: > > On 2019/3/26 下午8:49, Michael S. Tsirkin wrote: > > On Tue, Mar 26, 2019 at 02:59:19PM +0800, Jason Wang wrote: > > > On 2019/3/25 下午8:32, Michael S. Tsirkin wrote: > > > > On Mon, Mar 25, 2019 at 11:56:13AM +0800, Jason Wang wrote: >

Re: [Qemu-devel] [PATCH V2 RFT] vhost_net: don't set backend for the uninitialized virtqueue

2019-03-26 Thread Jason Wang
On 2019/3/26 下午8:49, Michael S. Tsirkin wrote: On Tue, Mar 26, 2019 at 02:59:19PM +0800, Jason Wang wrote: On 2019/3/25 下午8:32, Michael S. Tsirkin wrote: On Mon, Mar 25, 2019 at 11:56:13AM +0800, Jason Wang wrote: We used to set backend unconditionally, this won't work for some guests (e.g

Re: [Qemu-devel] [PATCH V2 RFT] vhost_net: don't set backend for the uninitialized virtqueue

2019-03-26 Thread Michael S. Tsirkin
On Tue, Mar 26, 2019 at 02:59:19PM +0800, Jason Wang wrote: > > On 2019/3/25 下午8:32, Michael S. Tsirkin wrote: > > On Mon, Mar 25, 2019 at 11:56:13AM +0800, Jason Wang wrote: > > > We used to set backend unconditionally, this won't work for some > > > guests (e.g windows driver) who may not

Re: [Qemu-devel] [PATCH V2 RFT] vhost_net: don't set backend for the uninitialized virtqueue

2019-03-26 Thread Jason Wang
On 2019/3/25 下午8:32, Michael S. Tsirkin wrote: On Mon, Mar 25, 2019 at 11:56:13AM +0800, Jason Wang wrote: We used to set backend unconditionally, this won't work for some guests (e.g windows driver) who may not initialize all virtqueues. For kernel backend, this will fail since it may try to

Re: [Qemu-devel] [PATCH V2 RFT] vhost_net: don't set backend for the uninitialized virtqueue

2019-03-25 Thread Michael S. Tsirkin
On Mon, Mar 25, 2019 at 11:56:13AM +0800, Jason Wang wrote: > We used to set backend unconditionally, this won't work for some > guests (e.g windows driver) who may not initialize all virtqueues. For > kernel backend, this will fail since it may try to validate the rings > during setting backend.

Re: [Qemu-devel] [PATCH V2 RFT] vhost_net: don't set backend for the uninitialized virtqueue

2019-03-25 Thread Yuri Benditovich
You're right, with just one latest patch things work. On Mon, Mar 25, 2019 at 11:59 AM Jason Wang wrote: > > > On 2019/3/25 下午5:56, Yuri Benditovich wrote: > > Hi Jason, > > > > This seems ok now (4 previous patches + this one) > > > Thanks for the testing. Could you test with just this patch?

Re: [Qemu-devel] [PATCH V2 RFT] vhost_net: don't set backend for the uninitialized virtqueue

2019-03-25 Thread Yuri Benditovich
Hi Jason, This seems ok now (4 previous patches + this one) On Mon, Mar 25, 2019 at 5:56 AM Jason Wang wrote: > > We used to set backend unconditionally, this won't work for some > guests (e.g windows driver) who may not initialize all virtqueues. For > kernel backend, this will fail since it

Re: [Qemu-devel] [PATCH V2 RFT] vhost_net: don't set backend for the uninitialized virtqueue

2019-03-25 Thread Jason Wang
On 2019/3/25 下午5:56, Yuri Benditovich wrote: Hi Jason, This seems ok now (4 previous patches + this one) Thanks for the testing. Could you test with just this patch? Since even without 4 previous patch, we've already had the check through virtio_queue_get_desc_addr() in

[Qemu-devel] [PATCH V2 RFT] vhost_net: don't set backend for the uninitialized virtqueue

2019-03-24 Thread Jason Wang
We used to set backend unconditionally, this won't work for some guests (e.g windows driver) who may not initialize all virtqueues. For kernel backend, this will fail since it may try to validate the rings during setting backend. Fixing this by simply skipping the backend set when we find desc is